aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/copilot
diff options
context:
space:
mode:
authorhjk <[email protected]>2024-07-03 12:16:38 +0200
committerhjk <[email protected]>2024-07-12 07:40:10 +0000
commitcba64c460b9c88d1145b7544af71dd483d024d2b (patch)
treedf32730eac9c55915d083210701d0ec9b53231d7 /src/plugins/copilot
parentbbb60533748875d8417dc647939650fd80a0ce64 (diff)
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 <[email protected]>
Diffstat (limited to 'src/plugins/copilot')
-rw-r--r--src/plugins/copilot/copilotplugin.cpp2
-rw-r--r--src/plugins/copilot/copilotsettings.cpp4
2 files changed, 3 insertions, 3 deletions
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)