CppEditor: Re-add function decl/def switch handler

Was accidentally removed in 3771eb196b.

Fixes: QTCREATORBUG-30363
Change-Id: Ifef1266b144d2eb5b7b69ff3e721f781b4455e96
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2024-02-13 17:00:04 +01:00
parent 5d8cf8ce09
commit 322dcd2c45

View File

@@ -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"));