Commit 28ec7caa authored by Eike Ziller's avatar Eike Ziller Committed by Erik Verbruggen

Correct some default shortcuts for Mac

This makes them align to the other "editor split" shortcuts.

Change-Id: I0b300ae495ffa17062a0a52b148f61015b965c29
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 52825a91
...@@ -231,7 +231,9 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err ...@@ -231,7 +231,9 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
new QAction(tr("Open Method Declaration/Definition in Next Split"), this); new QAction(tr("Open Method Declaration/Definition in Next Split"), this);
cmd = Core::ActionManager::registerAction(openDeclarationDefinitionInNextSplit, cmd = Core::ActionManager::registerAction(openDeclarationDefinitionInNextSplit,
Constants::OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT, context, true); 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()), connect(openDeclarationDefinitionInNextSplit, SIGNAL(triggered()),
this, SLOT(openDeclarationDefinitionInNextSplit())); this, SLOT(openDeclarationDefinitionInNextSplit()));
cppToolsMenu->addAction(cmd); cppToolsMenu->addAction(cmd);
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <coreplugin/vcsmanager.h> #include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h> #include <cppeditor/cppeditorconstants.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QtPlugin> #include <QtPlugin>
...@@ -127,7 +128,9 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -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); 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 = 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); mcpptools->addAction(command);
connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit())); connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit()));
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QDebug> #include <QDebug>
...@@ -388,7 +389,9 @@ void TextEditorActionHandler::createActions() ...@@ -388,7 +389,9 @@ void TextEditorActionHandler::createActions()
m_followSymbolInNextSplitAction = new QAction(tr("Follow Symbol Under Cursor in Next Split"), this); 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 = 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())); connect(m_followSymbolInNextSplitAction, SIGNAL(triggered()), this, SLOT(openLinkUnderCursorInNextSplit()));
m_jumpToFileAction = new QAction(tr("Jump To File Under Cursor"), this); m_jumpToFileAction = new QAction(tr("Jump To File Under Cursor"), this);
...@@ -398,7 +401,9 @@ void TextEditorActionHandler::createActions() ...@@ -398,7 +401,9 @@ void TextEditorActionHandler::createActions()
m_jumpToFileInNextSplitAction = new QAction(tr("Jump to File Under Cursor in Next Split"), this); 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 = 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())); connect(m_jumpToFileInNextSplitAction, SIGNAL(triggered()), this, SLOT(openLinkUnderCursorInNextSplit()));
QAction *a = 0; QAction *a = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment