From d298cffeb0202c2c7fad2b76345e34a12e9823d2 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 13 Sep 2011 11:07:37 +0200 Subject: [PATCH] C++ function signature: Add shortcut to marker tooltip. Change-Id: Ied3268bb624df4201ca42beb76d20b9a638d5918 Reviewed-on: http://codereview.qt-project.org/4746 Reviewed-by: Leandro T. C. Melo --- src/plugins/cppeditor/cppfunctiondecldeflink.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp index f8f4212d010..a992c629ba5 100644 --- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp +++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp @@ -48,6 +48,10 @@ #include #include #include +#include +#include +#include +#include #include @@ -357,6 +361,12 @@ void FunctionDeclDefLink::showMarker(CPPEditorWidget *editor) message = tr("Apply changes to definition"); else message = tr("Apply changes to declaration"); + + Core::ActionManager *actionManager = Core::ICore::instance()->actionManager(); + Core::Command *quickfixCommand = actionManager->command(TextEditor::Constants::QUICKFIX_THIS); + if (quickfixCommand) + message = Utils::ProxyAction::stringWithAppendedShortcut(message, quickfixCommand->keySequence()); + marker.tooltip = message; marker.data = QVariant::fromValue(Marker()); markers += marker;