From 263d98b8faacb0c0fb86a443451a397b40f328ed Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Sun, 13 Nov 2011 00:22:11 +0800 Subject: [PATCH] Fix crash of 'Build All' Change-Id: I70d415783da28aa91bdd4f97207aade5aa3e0a1c Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/projectexplorer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 250c1360a85..3de34a20476 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1797,6 +1797,7 @@ int ProjectExplorerPlugin::queue(QList projects, QStringList stepIds) return -1; QList stepLists; + QStringList names; foreach (const QString id, stepIds) { foreach (Project *pro, projects) { if (!pro || !pro->activeTarget()) @@ -1811,16 +1812,13 @@ int ProjectExplorerPlugin::queue(QList 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();