summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/buildconfiguration.cpp
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2010-04-13 15:04:21 +0200
committerdt <qtc-committer@nokia.com>2010-04-13 16:38:11 +0200
commit551114de27bc86e9ee708020e49363833a7d598f (patch)
tree6208a22d345097c8952fbde69251ae3186169ea7 /src/plugins/projectexplorer/buildconfiguration.cpp
parentc7dcb724556ffc781aed40715ab14d073d3ca464 (diff)
downloadqt-creator-551114de27bc86e9ee708020e49363833a7d598f.tar.gz
Prevent removing buildsteps if the buildsteps are queued for building.
Task-Nr: QTCREATORBUG-1044
Diffstat (limited to 'src/plugins/projectexplorer/buildconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 62ff647523..167a452d93 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -32,6 +32,8 @@
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
+#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/buildmanager.h>
#include <QtCore/QProcess>
@@ -187,11 +189,18 @@ void BuildConfiguration::insertStep(StepType type, int position, BuildStep *step
m_steps[type].insert(position, step);
}
-void BuildConfiguration::removeStep(StepType type, int position)
+bool BuildConfiguration::removeStep(StepType type, int position)
{
Q_ASSERT(type >= 0 && type < LastStepType);
+
+ ProjectExplorer::BuildManager *bm =
+ ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager();
+ if (bm->isBuilding(m_steps[type].at(position)))
+ return false;
+
delete m_steps[type].at(position);
m_steps[type].removeAt(position);
+ return true;
}
void BuildConfiguration::moveStepUp(StepType type, int position)