diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 11cfbb922f2e150c987bf524615c4cd938ac3dd7..24c046e17be7f9ff14eeed944c924601b8e871cb 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -231,7 +231,9 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err new QAction(tr("Open Method Declaration/Definition in Next Split"), this); cmd = Core::ActionManager::registerAction(openDeclarationDefinitionInNextSplit, Constants::OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT, context, true); - cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E, Shift+F2"))); + cmd->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost() + ? tr("Meta+E, Shift+F2") + : tr("Ctrl+E, Shift+F2"))); connect(openDeclarationDefinitionInNextSplit, SIGNAL(triggered()), this, SLOT(openDeclarationDefinitionInNextSplit())); cppToolsMenu->addAction(cmd); diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 4549f9c4676cbb0a071cf276f450339c9bab7613..e8f1a46c84727a6a638dfdb10cd27003e198223f 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -49,6 +49,7 @@ #include <coreplugin/vcsmanager.h> #include <cppeditor/cppeditorconstants.h> +#include <utils/hostosinfo.h> #include <utils/qtcassert.h> #include <QtPlugin> @@ -127,7 +128,9 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) QAction *openInNextSplitAction = new QAction(tr("Open Corresponding Header/Source in Next Split"), this); command = Core::ActionManager::registerAction(openInNextSplitAction, Constants::OPEN_HEADER_SOURCE_IN_NEXT_SPLIT, context, true); - command->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_E, Qt::Key_F4)); + command->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost() + ? tr("Meta+E, F4") + : tr("Ctrl+E, F4"))); mcpptools->addAction(command); connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit())); diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 134fb8c9244e66a4086aedc0a2329a7d58596e3e..45824d940bcc74a15ddcd9e594b05aabf255b3ba 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -40,6 +40,7 @@ #include <coreplugin/coreconstants.h> #include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actioncontainer.h> +#include <utils/hostosinfo.h> #include <utils/qtcassert.h> #include <QDebug> @@ -388,7 +389,9 @@ void TextEditorActionHandler::createActions() m_followSymbolInNextSplitAction = new QAction(tr("Follow Symbol Under Cursor in Next Split"), this); command = Core::ActionManager::registerAction(m_followSymbolInNextSplitAction, Constants::FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT, m_contextId, true); - command->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_E, Qt::Key_F2)); + command->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost() + ? tr("Meta+E, F2") + : tr("Ctrl+E, F2"))); connect(m_followSymbolInNextSplitAction, SIGNAL(triggered()), this, SLOT(openLinkUnderCursorInNextSplit())); m_jumpToFileAction = new QAction(tr("Jump To File Under Cursor"), this); @@ -398,7 +401,9 @@ void TextEditorActionHandler::createActions() m_jumpToFileInNextSplitAction = new QAction(tr("Jump to File Under Cursor in Next Split"), this); command = Core::ActionManager::registerAction(m_jumpToFileInNextSplitAction, Constants::JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT, m_contextId, true); - command->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_E, Qt::Key_F2)); + command->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost() + ? tr("Meta+E, F2") + : tr("Ctrl+E, F2"))); connect(m_jumpToFileInNextSplitAction, SIGNAL(triggered()), this, SLOT(openLinkUnderCursorInNextSplit())); QAction *a = 0;