forked from qt-creator/qt-creator
Handle tool chain configuration changes
Reviewed-by: dt
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -123,6 +123,7 @@ protected:
|
||||
private slots:
|
||||
void handleToolChainRemovals(ProjectExplorer::ToolChain *tc);
|
||||
void handleToolChainAddition(ProjectExplorer::ToolChain *tc);
|
||||
void handleToolChainUpdates(ProjectExplorer::ToolChain*);
|
||||
|
||||
private:
|
||||
bool m_clearSystemEnvironment;
|
||||
|
Reference in New Issue
Block a user