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:
Eike Ziller
2012-05-23 13:25:51 +02:00
committed by hjk
parent 1a81c33e2f
commit 1781617f8e
22 changed files with 114 additions and 355 deletions

View File

@@ -217,11 +217,8 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this);
cmd = am->registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context);
#ifdef Q_OS_MACX
cmd->setDefaultKeySequence(QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space));
#else
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space));
#endif
cmd->setDefaultKeySequence(Core::UseMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space)
: QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space));
connect(showQuickToolbar, SIGNAL(triggered()), this, SLOT(showContextPane()));
contextMenu->addAction(cmd);
qmlToolsMenu->addAction(cmd);