aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2024-02-13 17:00:04 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2024-02-13 16:27:28 +0000
commit322dcd2c456dffeac1bf24496af77030776893f7 (patch)
tree6e1cef88f2b71149d7e7a874c3fde3e8ae3f0648 /src/plugins/cppeditor
parent5d8cf8ce09a8b47dd40cb1c43fe7980dc939b5e0 (diff)
CppEditor: Re-add function decl/def switch handler
Was accidentally removed in 3771eb196b066314d427d7343cb1d4c6e2c5d6a4. Fixes: QTCREATORBUG-30363 Change-Id: Ifef1266b144d2eb5b7b69ff3e721f781b4455e96 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r--src/plugins/cppeditor/cppeditorplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp
index b68c739f82..c9185e372c 100644
--- a/src/plugins/cppeditor/cppeditorplugin.cpp
+++ b/src/plugins/cppeditor/cppeditorplugin.cpp
@@ -323,6 +323,10 @@ void CppEditorPlugin::addPerSymbolActions()
switchDeclDef.setTouchBarText(Tr::tr("Decl/Def", "text on macOS touch bar"));
switchDeclDef.addToContainers(menus, Constants::G_SYMBOL);
switchDeclDef.addToContainer(Core::Constants::TOUCH_BAR, Core::Constants::G_TOUCHBAR_NAVIGATION);
+ switchDeclDef.addOnTriggered(this, [] {
+ if (CppEditorWidget *editorWidget = currentCppEditorWidget())
+ editorWidget->switchDeclarationDefinition(/*inNextSplit*/ false);
+ });
ActionBuilder openDeclDefSplit(this, Constants::OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT);
openDeclDefSplit.setText(Tr::tr("Open Function Declaration/Definition in Next Split"));