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

Stop warnings on using QFileInfo without proper filename

 * Stop warnings about using QFileInfo without a proper filename.

   Turns out that the filename of the project can still be empty
   when calling these methods from the new project wizard (before
   the first page is done).
parent dcd62a2a
No related branches found
No related tags found
No related merge requests found
......@@ -234,6 +234,8 @@ QString Project::projectDirectory() const
QString Project::projectDirectory(const QString &proFile)
{
if (proFile.isEmpty())
return QString();
QFileInfo info(proFile);
return info.absoluteDir().path();
}
......
......@@ -793,6 +793,8 @@ QString Qt4Project::defaultTopLevelBuildDirectory() const
QString Qt4Project::defaultTopLevelBuildDirectory(const QString &profilePath)
{
if (profilePath.isEmpty())
return QString();
QFileInfo info(profilePath);
return QDir(projectDirectory(profilePath) + QLatin1String("/../") + info.baseName() + QLatin1String("-build")).absolutePath();
}
......
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