ToolChain: Update build environment when changing tool chains

This commit is contained in:
Tobias Hunger
2011-04-19 11:43:28 +02:00
parent 16628437d8
commit bd14905953
2 changed files with 8 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *sourc
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()
@@ -188,6 +190,8 @@ void BuildConfiguration::handleToolChainUpdates(ProjectExplorer::ToolChain *tc)
QList<ToolChain *> candidates = target()->possibleToolChains(this);
if (!candidates.contains(m_toolChain))
setToolChain(target()->preferredToolChain(this));
else
emit toolChainChanged();
}