summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2011-01-19 15:46:01 +0100
committerdt <qtc-committer@nokia.com>2011-01-19 15:47:00 +0100
commite505604b92ff57daab69213b73c6098454ca0bd1 (patch)
tree9bc4e05eb2dc9e40bce8664116c376d73354122b /src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
parent8fdef8e3165006ece24e044252a37efb12b655f4 (diff)
downloadqt-creator-e505604b92ff57daab69213b73c6098454ca0bd1.tar.gz
ProjectExplore: Introduce dis/enabling of buildconfigurations
The build actions are disabled if the buildconfiguration is disabled. The deploy and run actions are disabled if deploying or running invokes building automatically. Qt4BuildConfigurations are disabled while parsing. Task-Nr: QTCREATORBUG-2576
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4buildconfiguration.cpp')
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
index d8b399eaf4..35e8ed07e2 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
@@ -70,6 +70,7 @@ enum { debug = 0 };
Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target) :
BuildConfiguration(target, QLatin1String(QT4_BC_ID)),
m_shadowBuild(true),
+ m_isEnabled(false),
m_qtVersionId(-1),
m_toolChainType(-1), // toolChainType() makes sure to return the default toolchainType
m_qmakeBuildConfiguration(0),
@@ -81,6 +82,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target) :
Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target, const QString &id) :
BuildConfiguration(target, id),
m_shadowBuild(true),
+ m_isEnabled(false),
m_qtVersionId(-1),
m_toolChainType(-1), // toolChainType() makes sure to return the default toolchainType
m_qmakeBuildConfiguration(0),
@@ -92,6 +94,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target, const QStrin
Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target, Qt4BuildConfiguration *source) :
BuildConfiguration(target, source),
m_shadowBuild(source->m_shadowBuild),
+ m_isEnabled(false),
m_buildDirectory(source->m_buildDirectory),
m_qtVersionId(source->m_qtVersionId),
m_toolChainType(source->m_toolChainType),
@@ -652,6 +655,19 @@ ProjectExplorer::IOutputParser *Qt4BuildConfiguration::createOutputParser() cons
return 0;
}
+bool Qt4BuildConfiguration::isEnabled() const
+{
+ return m_isEnabled;
+}
+
+void Qt4BuildConfiguration::setEnabled(bool enabled)
+{
+ if (m_isEnabled == enabled)
+ return;
+ m_isEnabled = enabled;
+ emit enabledChanged();
+}
+
/*!
\class Qt4BuildConfigurationFactory
*/