forked from qt-creator/qt-creator
QmlProject: Use IRunConfiguration's changed() signal
... instead of directly accessing the owning runconfig. The removes two uses of IRCAspect::runConfiguration() which is meant to be removed soon. Change-Id: Ia713864f2544e3c6741482b2663ee54fd2ee80e1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -238,8 +238,7 @@ void MainQmlFileAspect::setScriptSource(MainScriptSource source, const QString &
|
||||
m_mainScriptFilename = project->projectDirectory().toString() + '/' + m_scriptFile;
|
||||
}
|
||||
|
||||
qobject_cast<QmlProjectRunConfiguration *>(runConfiguration())->updateEnabledState();
|
||||
|
||||
emit changed();
|
||||
updateFileComboBox();
|
||||
}
|
||||
|
||||
@@ -273,7 +272,7 @@ void MainQmlFileAspect::changeCurrentFile(IEditor *editor)
|
||||
if (editor)
|
||||
m_currentFileFilename = editor->document()->filePath().toString();
|
||||
|
||||
qobject_cast<QmlProjectRunConfiguration *>(runConfiguration())->updateEnabledState();
|
||||
emit changed();
|
||||
}
|
||||
|
||||
|
||||
@@ -292,6 +291,8 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
||||
argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY);
|
||||
|
||||
m_mainQmlFileAspect = addAspect<MainQmlFileAspect>();
|
||||
connect(m_mainQmlFileAspect, &MainQmlFileAspect::changed,
|
||||
this, &QmlProjectRunConfiguration::updateEnabledState);
|
||||
|
||||
setOutputFormatter<QtSupport::QtOutputFormatter>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user