aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cvs/cvsplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2012-05-22 16:08:40 +0200
committerEike Ziller <[email protected]>2012-05-22 16:48:20 +0200
commit48a23cc28b04126124cda74670d03d4286afa40d (patch)
tree5d83da71ad3b81ba43f6b4918fbff330076dd774 /src/plugins/cvs/cvsplugin.cpp
parentd8429000f014ed04964948a454a5d6e285646686 (diff)
Mac: Avoid Alt+<character> shortcuts
Because these tend to add special characters into the editor instead of triggering the shortcut. Use Ctrl (aka Qt's Meta) instead. Change-Id: I5866772baf4550e6d048e4d7252b2899a6d28296 Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r--src/plugins/cvs/cvsplugin.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 8428483917d..baa3a35c500 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -285,7 +285,11 @@ 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
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
@@ -314,7 +318,11 @@ 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
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
@@ -323,7 +331,11 @@ 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
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);