Commit 7baa0d2f authored by Daniel Teske's avatar Daniel Teske

BuildConfiguration: Simplfy code dealing with kit changes

Change-Id: Ia3014640b2e900998b8ebbda94975d15ea76ca70
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent ec272ea0
......@@ -92,8 +92,8 @@ BuildConfiguration::BuildConfiguration(Target *target, const Core::Id id) :
bsl->setDefaultDisplayName(tr("Clean"));
m_stepLists.append(bsl);
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
connect(target, SIGNAL(kitChanged()),
this, SLOT(handleKitUpdate()));
}
BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *source) :
......@@ -107,8 +107,8 @@ BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *sourc
// otherwise BuildStepFactories might reject to set up a BuildStep for us
// since we are not yet the derived class!
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
connect(target, SIGNAL(kitChanged()),
this, SLOT(handleKitUpdate()));
}
BuildConfiguration::~BuildConfiguration()
......@@ -187,10 +187,8 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
return ProjectConfiguration::fromMap(map);
}
void BuildConfiguration::handleKitUpdate(ProjectExplorer::Kit *k)
void BuildConfiguration::handleKitUpdate()
{
if (k != target()->kit())
return;
emit environmentChanged();
}
......
......@@ -111,7 +111,7 @@ protected:
virtual bool fromMap(const QVariantMap &map);
private slots:
void handleKitUpdate(ProjectExplorer::Kit *k);
void handleKitUpdate();
private:
bool m_clearSystemEnvironment;
......
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