diff options
author | dt <qtc-committer@nokia.com> | 2010-04-13 15:04:21 +0200 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2010-04-13 16:38:11 +0200 |
commit | 551114de27bc86e9ee708020e49363833a7d598f (patch) | |
tree | 6208a22d345097c8952fbde69251ae3186169ea7 /src/plugins/projectexplorer/buildconfiguration.cpp | |
parent | c7dcb724556ffc781aed40715ab14d073d3ca464 (diff) | |
download | qt-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.cpp | 11 |
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) |