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

@@ -174,11 +174,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
m_postEditorAction = new QAction(tr("Paste Snippet..."), this);
command = actionManager->registerAction(m_postEditorAction, "CodePaster.Post", globalcontext);
#ifdef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+P")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+P")));
#endif
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+P") : tr("Alt+C,Alt+P")));
connect(m_postEditorAction, SIGNAL(triggered()), this, SLOT(postEditor()));
cpContainer->addAction(command);
@@ -189,11 +185,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
#ifdef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+F")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+F")));
#endif
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+F") : tr("Alt+C,Alt+F")));
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
cpContainer->addAction(command);