forked from qt-creator/qt-creator
BuildConfiguration: Simplfy code dealing with kit changes
Change-Id: Ia3014640b2e900998b8ebbda94975d15ea76ca70 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user