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

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
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);
......
......@@ -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()));
......
......@@ -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;
......
Supports Markdown
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