From c7f6c06dcba97559bd504d6d0ce0d18dd79e1fa0 Mon Sep 17 00:00:00 2001 From: Jarek Kobus <jkobus@trolltech.com> Date: Fri, 5 Aug 2011 13:13:17 +0200 Subject: [PATCH] Add "Switch Header/Source" action to the context menu Task-number: QTCREATORBUG-5324 Change-Id: I137c9430e538714684ff6000ea68340a6f802615 Reviewed-on: http://codereview.qt.nokia.com/2688 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com> --- src/plugins/cppeditor/cppplugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index c35b5272c9d..eb4bb5d4291 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -243,6 +243,9 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess Core::Command *cmd; Core::ActionContainer *cppToolsMenu = am->actionContainer(Core::Id(CppTools::Constants::M_TOOLS_CPP)); + cmd = am->command(Core::Id(CppTools::Constants::SWITCH_HEADER_SOURCE)); + contextMenu->addAction(cmd); + QAction *jumpToDefinition = new QAction(tr("Follow Symbol Under Cursor"), this); cmd = am->registerAction(jumpToDefinition, Constants::JUMP_TO_DEFINITION, context, true); -- GitLab