Skip to content
Snippets Groups Projects
Commit e441efe8 authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk
Browse files

Fix warnings about QFileInfo being called with empty path

(cherry picked from commit e98282fc)
parent 265d5281
No related branches found
No related tags found
No related merge requests found
...@@ -234,6 +234,8 @@ QString Project::projectDirectory() const ...@@ -234,6 +234,8 @@ QString Project::projectDirectory() const
QString Project::projectDirectory(const QString &proFile) QString Project::projectDirectory(const QString &proFile)
{ {
if (proFile.isEmpty())
return QString();
QFileInfo info(proFile); QFileInfo info(proFile);
return info.absoluteDir().path(); return info.absoluteDir().path();
} }
......
...@@ -353,7 +353,7 @@ TargetSetupPage::recursivelyCheckDirectoryForBuild(const QString &directory, con ...@@ -353,7 +353,7 @@ TargetSetupPage::recursivelyCheckDirectoryForBuild(const QString &directory, con
{ {
QList<ImportInfo> results; QList<ImportInfo> results;
if (maxdepth <= 0) if (maxdepth <= 0 || directory.isEmpty())
return results; return results;
// Check for in-source builds first: // Check for in-source builds first:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment