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

@@ -88,22 +88,14 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
QAction *startMacro = new QAction(tr("Record Macro"), this);
Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext);
#ifdef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+(")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+(")));
#endif
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
mmacrotools->addAction(command);
connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro()));
QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
endMacro->setEnabled(false);
command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext);
#ifdef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+)")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+)")));
#endif
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
mmacrotools->addAction(command);
connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro()));