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) :
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
{
private slots:
void handleToolChainRemovals(ProjectExplorer::ToolChain *tc);
void handleToolChainAddition(ProjectExplorer::ToolChain *tc);
+ void handleToolChainUpdates(ProjectExplorer::ToolChain*);
private:
bool m_clearSystemEnvironment;