Commit 0609b5b8 authored by dt's avatar dt
Browse files

Qt4Projectmanager: Do not crash on importing projects without builds

parent 431d8346
......@@ -739,7 +739,9 @@ QList<BuildConfigurationInfo> BuildConfigurationInfo::importBuildConfigurations(
// Check for in source build first
QString sourceDir = QFileInfo(proFilePath).absolutePath();
result.append(checkForBuild(sourceDir, proFilePath));
BuildConfigurationInfo info = checkForBuild(sourceDir, proFilePath);
if (info.isValid())
// If we found a in source build, we do not search for out of source builds
if (!result.isEmpty())
......@@ -752,7 +754,9 @@ QList<BuildConfigurationInfo> BuildConfigurationInfo::importBuildConfigurations(
foreach (Qt4BaseTargetFactory *factory, factories) {
foreach (const QString &id, factory->supportedTargetIds(0)) {
QString expectedBuild = factory->defaultShadowBuildDirectory(defaultTopLevelBuildDirectory, id);
result.append(checkForBuild(expectedBuild, proFilePath));
BuildConfigurationInfo info = checkForBuild(expectedBuild, proFilePath);
if (info.isValid())
return result;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment