From cba64c460b9c88d1145b7544af71dd483d024d2b Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 3 Jul 2024 12:16:38 +0200 Subject: 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 --- src/plugins/copilot/copilotplugin.cpp | 2 +- src/plugins/copilot/copilotsettings.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/copilot') diff --git a/src/plugins/copilot/copilotplugin.cpp b/src/plugins/copilot/copilotplugin.cpp index b5729fe955d..9e7baeab165 100644 --- a/src/plugins/copilot/copilotplugin.cpp +++ b/src/plugins/copilot/copilotplugin.cpp @@ -125,7 +125,7 @@ public: requestAct->setEnabled(enabled); }; - connect(&settings().enableCopilot, &BaseAspect::changed, this, updateActions); + settings().enableCopilot.addOnChanged(this, updateActions); updateActions(); diff --git a/src/plugins/copilot/copilotsettings.cpp b/src/plugins/copilot/copilotsettings.cpp index 81fd4c3b126..fc1c48ea419 100644 --- a/src/plugins/copilot/copilotsettings.cpp +++ b/src/plugins/copilot/copilotsettings.cpp @@ -252,8 +252,8 @@ CopilotProjectSettings::CopilotProjectSettings(ProjectExplorer::Project *project Store map = storeFromVariant(project->namedSettings(Constants::COPILOT_PROJECT_SETTINGS_ID)); fromMap(map); - connect(&enableCopilot, &BaseAspect::changed, this, [this, project] { save(project); }); - connect(&useGlobalSettings, &BaseAspect::changed, this, [this, project] { save(project); }); + enableCopilot.addOnChanged(this, [this, project] { save(project); }); + useGlobalSettings.addOnChanged(this, [this, project] { save(project); }); } void CopilotProjectSettings::setUseGlobalSettings(bool useGlobal) -- cgit v1.2.3