summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/buildconfiguration.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2011-03-24 14:35:03 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2011-03-24 15:45:31 +0100
commitee4700d934d576522491ec0e0ca049d1b6527ddb (patch)
tree77b4f9334592754e5f4162985bb634ccef309fbb /src/plugins/projectexplorer/buildconfiguration.cpp
parent4e564135eff452cc3156d0862b1f1a0ddb8a4f65 (diff)
downloadqt-creator-ee4700d934d576522491ec0e0ca049d1b6527ddb.tar.gz
Handle tool chain configuration changes
Reviewed-by: dt
Diffstat (limited to 'src/plugins/projectexplorer/buildconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 19859186a3..4f6e604677 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -77,6 +77,8 @@ BuildConfiguration::BuildConfiguration(Target *target, const QString &id) :
this, SLOT(handleToolChainRemovals(ProjectExplorer::ToolChain*)));
connect(ToolChainManager::instance(), SIGNAL(toolChainAdded(ProjectExplorer::ToolChain*)),
this, SLOT(handleToolChainAddition(ProjectExplorer::ToolChain*)));
+ connect(ToolChainManager::instance(), SIGNAL(toolChainUpdated(ProjectExplorer::ToolChain*)),
+ this, SLOT(handleToolChainUpdates(ProjectExplorer::ToolChain*)));
}
BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *source) :
@@ -180,6 +182,15 @@ void BuildConfiguration::handleToolChainAddition(ProjectExplorer::ToolChain *tc)
setToolChain(target()->preferredToolChain(this));
}
+void BuildConfiguration::handleToolChainUpdates(ProjectExplorer::ToolChain *tc)
+{
+ if (tc != m_toolChain)
+ return;
+ QList<ToolChain *> candidates = target()->possibleToolChains(this);
+ if (!candidates.contains(m_toolChain))
+ setToolChain(target()->preferredToolChain(this));
+}
+
Target *BuildConfiguration::target() const
{