Commit bd149059 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ToolChain: Update build environment when changing tool chains

parent 16628437
......@@ -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();
}
......
......@@ -71,12 +71,16 @@ void BuildEnvironmentWidget::init(BuildConfiguration *bc)
if (m_buildConfiguration) {
disconnect(m_buildConfiguration, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
disconnect(m_buildConfiguration, SIGNAL(toolChainChanged()),
this, SLOT(environmentChanged()));
}
m_buildConfiguration = bc;
connect(m_buildConfiguration, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
connect(m_buildConfiguration, SIGNAL(toolChainChanged()),
this, SLOT(environmentChanged()));
m_clearSystemEnvironmentCheckBox->setChecked(!m_buildConfiguration->useSystemEnvironment());
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment