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:
hjk
2018-09-10 13:54:04 +02:00
parent ff948fad87
commit 907767b89b
2 changed files with 4 additions and 5 deletions

View File

@@ -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>();