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"));
|
bsl->setDefaultDisplayName(tr("Clean"));
|
||||||
m_stepLists.append(bsl);
|
m_stepLists.append(bsl);
|
||||||
|
|
||||||
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
|
connect(target, SIGNAL(kitChanged()),
|
||||||
this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
|
this, SLOT(handleKitUpdate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *source) :
|
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
|
// otherwise BuildStepFactories might reject to set up a BuildStep for us
|
||||||
// since we are not yet the derived class!
|
// since we are not yet the derived class!
|
||||||
|
|
||||||
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
|
connect(target, SIGNAL(kitChanged()),
|
||||||
this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
|
this, SLOT(handleKitUpdate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildConfiguration::~BuildConfiguration()
|
BuildConfiguration::~BuildConfiguration()
|
||||||
@@ -187,10 +187,8 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return ProjectConfiguration::fromMap(map);
|
return ProjectConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildConfiguration::handleKitUpdate(ProjectExplorer::Kit *k)
|
void BuildConfiguration::handleKitUpdate()
|
||||||
{
|
{
|
||||||
if (k != target()->kit())
|
|
||||||
return;
|
|
||||||
emit environmentChanged();
|
emit environmentChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ protected:
|
|||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleKitUpdate(ProjectExplorer::Kit *k);
|
void handleKitUpdate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_clearSystemEnvironment;
|
bool m_clearSystemEnvironment;
|
||||||
|
|||||||
Reference in New Issue
Block a user