diff options
author | Eike Ziller <[email protected]> | 2012-05-23 13:25:51 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2012-05-23 13:47:13 +0200 |
commit | 1781617f8e88f1466ab2a1ad3d87ba3be92bca23 (patch) | |
tree | 1d2f7b7afac1ba78e4f10eb4afd5e380a79645ea /src/plugins/cvs/cvsplugin.cpp | |
parent | 1a81c33e2f4b061610b0169e819250e2124c41c8 (diff) |
Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now.
Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index baa3a35c500..778e9ed420c 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -285,11 +285,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ami->registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, globalcontext); command->setAttribute(Command::CA_UpdateText); -#ifdef Q_OS_MAC - command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+D"))); -#else - command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+D"))); -#endif + command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+D") : tr("Alt+C,Alt+D"))); connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -318,11 +314,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ami->registerAction(m_addAction, CMD_ID_ADD, globalcontext); command->setAttribute(Command::CA_UpdateText); -#ifdef Q_OS_MAC - command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+A"))); -#else - command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+A"))); -#endif + command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+A") : tr("Alt+C,Alt+A"))); connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -331,11 +323,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ami->registerAction(m_commitCurrentAction, CMD_ID_COMMIT_CURRENT, globalcontext); command->setAttribute(Command::CA_UpdateText); -#ifdef Q_OS_MAC - command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+C"))); -#else - command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+C"))); -#endif + command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+C") : tr("Alt+C,Alt+C"))); connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile())); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); |