forked from qt-creator/qt-creator
Use the new BaseAspect::addOnChanged in a few places
... and in some cases move it closer to the aspect setup. I kept the original location in cases where the order possibly matters. Change-Id: I4774ea355d0d1e3cf890676a84121195fca6d406 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -201,11 +201,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
|
||||
auto buildDirAspect = bc->buildDirectoryAspect();
|
||||
buildDirAspect->setAutoApplyOnEditingFinished(true);
|
||||
connect(buildDirAspect, &BaseAspect::changed, this, [this] {
|
||||
m_configModel->flush(); // clear out config cache...;
|
||||
});
|
||||
buildDirAspect->addOnChanged(this, [this] { m_configModel->flush(); }); // clear config cache
|
||||
|
||||
connect(&m_buildConfig->buildTypeAspect, &BaseAspect::changed, this, [this] {
|
||||
m_buildConfig->buildTypeAspect.addOnChanged(this, [this] {
|
||||
if (!m_buildConfig->cmakeBuildSystem()->isMultiConfig()) {
|
||||
CMakeConfig config;
|
||||
config << CMakeConfigItem("CMAKE_BUILD_TYPE",
|
||||
@@ -216,9 +214,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
});
|
||||
|
||||
auto qmlDebugAspect = bc->aspect<QtSupport::QmlDebuggingAspect>();
|
||||
connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, this, [this] {
|
||||
updateButtonState();
|
||||
});
|
||||
qmlDebugAspect->addOnChanged(this, [this] { updateButtonState(); });
|
||||
|
||||
m_warningMessageLabel = new InfoLabel({}, InfoLabel::Warning);
|
||||
m_warningMessageLabel->setVisible(false);
|
||||
|
||||
@@ -610,11 +610,11 @@ QWidget *CMakeBuildStep::createConfigWidget()
|
||||
|
||||
updateDetails();
|
||||
|
||||
connect(&cmakeArguments, &BaseAspect::changed, this, updateDetails);
|
||||
connect(&toolArguments, &BaseAspect::changed, this, updateDetails);
|
||||
connect(&useStaging, &BaseAspect::changed, this, updateDetails);
|
||||
connect(&stagingDir, &BaseAspect::changed, this, updateDetails);
|
||||
connect(&useiOSAutomaticProvisioningUpdates, &BaseAspect::changed, this, updateDetails);
|
||||
cmakeArguments.addOnChanged(this, updateDetails);
|
||||
toolArguments.addOnChanged(this, updateDetails);
|
||||
useStaging.addOnChanged(this, updateDetails);
|
||||
stagingDir.addOnChanged(this, updateDetails);
|
||||
useiOSAutomaticProvisioningUpdates.addOnChanged(this, updateDetails);
|
||||
|
||||
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
|
||||
this, updateDetails);
|
||||
|
||||
@@ -116,8 +116,7 @@ public:
|
||||
&& isApplicable(editor->document()));
|
||||
};
|
||||
|
||||
connect(&autoFormatMime, &Utils::StringAspect::changed,
|
||||
this, updateActions);
|
||||
autoFormatMime.addOnChanged(this, updateActions);
|
||||
connect(EditorManager::instance(), &EditorManager::currentEditorChanged,
|
||||
this, updateActions);
|
||||
connect(EditorManager::instance(), &EditorManager::aboutToSave,
|
||||
|
||||
@@ -99,7 +99,7 @@ QWidget *CMakeInstallStep::createConfigWidget()
|
||||
|
||||
updateDetails();
|
||||
|
||||
connect(&cmakeArguments, &StringAspect::changed, this, updateDetails);
|
||||
cmakeArguments.addOnChanged(this, updateDetails);
|
||||
|
||||
connect(ProjectExplorerPlugin::instance(),
|
||||
&ProjectExplorerPlugin::settingsChanged,
|
||||
|
||||
Reference in New Issue
Block a user