Fix crash of 'Build All'

Change-Id: I70d415783da28aa91bdd4f97207aade5aa3e0a1c
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Yuchen Deng
2011-11-13 00:22:11 +08:00
committed by Daniel Teske
parent b7c24130f7
commit 263d98b8fa

View File

@@ -1797,6 +1797,7 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QStringList stepIds)
return -1;
QList<BuildStepList *> stepLists;
QStringList names;
foreach (const QString id, stepIds) {
foreach (Project *pro, projects) {
if (!pro || !pro->activeTarget())
@@ -1811,16 +1812,13 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QStringList stepIds)
if (!bsl || bsl->isEmpty())
continue;
stepLists << bsl;
names << displayNameForStepId(id);
}
}
if (stepLists.isEmpty())
return 0;
QStringList names;
foreach (const QString &stepId, stepIds)
names << displayNameForStepId(stepId);
if (!d->m_buildManager->buildLists(stepLists, names))
return -1;
return stepLists.count();