ProjectExplorer: Make enabled state updating part of runconfig updates

RunConfiguration::update() is becoming a central place acting on
requests to act on interesting changes, triggering notifications
to "the outside" from there is natural.

Change-Id: I159cb548c159a607e2628a178362987fb37b59e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-12-04 09:19:50 +01:00
parent 6771a46928
commit d79c76eb11
4 changed files with 10 additions and 21 deletions

View File

@@ -315,14 +315,12 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
});
m_mainQmlFileAspect = addAspect<MainQmlFileAspect>(target);
connect(m_mainQmlFileAspect, &MainQmlFileAspect::changed,
this, &QmlProjectRunConfiguration::updateEnabledState);
connect(m_mainQmlFileAspect, &MainQmlFileAspect::changed, this, &RunConfiguration::update);
connect(target, &Target::kitChanged,
this, &QmlProjectRunConfiguration::updateEnabledState);
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
setDisplayName(tr("QML Scene", "QMLRunConfiguration display name."));
updateEnabledState();
update();
}
Runnable QmlProjectRunConfiguration::runnable() const