diff options
author | hjk <[email protected]> | 2023-12-13 12:29:46 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2023-12-13 13:00:00 +0000 |
commit | b442ca38731e007ff57b7fb84461f758989b686f (patch) | |
tree | b78477cb9d8b862638078f631f15d780522f6af0 /src/plugins/copilot | |
parent | 3b7d29d2a12429fe61f510c73e03b3048163d9d3 (diff) |
Core: Rename ActionBuilder::setOn* to addOn*
There could be multiple connections.
Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/copilot')
-rw-r--r-- | src/plugins/copilot/copilotplugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/copilot/copilotplugin.cpp b/src/plugins/copilot/copilotplugin.cpp index 78ca70b3fd9..b5729fe955d 100644 --- a/src/plugins/copilot/copilotplugin.cpp +++ b/src/plugins/copilot/copilotplugin.cpp @@ -65,7 +65,7 @@ public: requestAction.setText(Tr::tr("Request Copilot Suggestion")); requestAction.setToolTip(Tr::tr( "Request Copilot suggestion at the current editor's cursor position.")); - requestAction.setOnTriggered(this, [this] { + requestAction.addOnTriggered(this, [this] { if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) { if (m_client && m_client->reachable()) m_client->requestCompletions(editor); @@ -76,7 +76,7 @@ public: nextSuggestionAction.setText(Tr::tr("Show Next Copilot Suggestion")); nextSuggestionAction.setToolTip(Tr::tr( "Cycles through the received Copilot Suggestions showing the next available Suggestion.")); - nextSuggestionAction.setOnTriggered(this, [] { + nextSuggestionAction.addOnTriggered(this, [] { if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) cycleSuggestion(editor, Next); }); @@ -85,7 +85,7 @@ public: previousSuggestionAction.setText(Tr::tr("Show Previous Copilot Suggestion")); previousSuggestionAction.setToolTip(Tr::tr("Cycles through the received Copilot Suggestions " "showing the previous available Suggestion.")); - previousSuggestionAction.setOnTriggered(this, [] { + previousSuggestionAction.addOnTriggered(this, [] { if (auto editor = TextEditor::TextEditorWidget::currentTextEditorWidget()) cycleSuggestion(editor, Previous); }); @@ -93,7 +93,7 @@ public: ActionBuilder disableAction(this, Constants::COPILOT_DISABLE); disableAction.setText(Tr::tr("Disable Copilot")); disableAction.setToolTip(Tr::tr("Disable Copilot.")); - disableAction.setOnTriggered(this, [] { + disableAction.addOnTriggered(this, [] { settings().enableCopilot.setValue(true); settings().apply(); }); @@ -101,7 +101,7 @@ public: ActionBuilder enableAction(this, Constants::COPILOT_ENABLE); enableAction.setText(Tr::tr("Enable Copilot")); enableAction.setToolTip(Tr::tr("Enable Copilot.")); - enableAction.setOnTriggered(this, [] { + enableAction.addOnTriggered(this, [] { settings().enableCopilot.setValue(false); settings().apply(); }); @@ -111,7 +111,7 @@ public: toggleAction.setCheckable(true); toggleAction.setChecked(settings().enableCopilot()); toggleAction.setIcon(COPILOT_ICON.icon()); - toggleAction.setOnTriggered(this, [](bool checked) { + toggleAction.addOnTriggered(this, [](bool checked) { settings().enableCopilot.setValue(checked); settings().apply(); }); |