forked from qt-creator/qt-creator
Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now. Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -83,11 +83,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
||||
m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
|
||||
Core::Command *cmd =
|
||||
am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext);
|
||||
#ifndef Q_OS_MAC
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
|
||||
#else
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+M")));
|
||||
#endif
|
||||
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
|
||||
mbm->addAction(cmd);
|
||||
|
||||
QAction *sep = new QAction(this);
|
||||
@@ -98,21 +94,13 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
||||
//Previous
|
||||
m_prevAction = new QAction(tr("Previous Bookmark"), this);
|
||||
cmd = am->registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, globalcontext);
|
||||
#ifndef Q_OS_MAC
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
|
||||
#else
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+,")));
|
||||
#endif
|
||||
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+,") : tr("Ctrl+,")));
|
||||
mbm->addAction(cmd);
|
||||
|
||||
//Next
|
||||
m_nextAction = new QAction(tr("Next Bookmark"), this);
|
||||
cmd = am->registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, globalcontext);
|
||||
#ifndef Q_OS_MAC
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+.")));
|
||||
#else
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+.")));
|
||||
#endif
|
||||
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+.") : tr("Ctrl+.")));
|
||||
mbm->addAction(cmd);
|
||||
|
||||
sep = new QAction(this);
|
||||
|
||||
Reference in New Issue
Block a user