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 <tobias.hunger@nokia.com>
This commit is contained in:
Eike Ziller
2012-05-22 16:08:40 +02:00
parent d8429000f0
commit 48a23cc28b
8 changed files with 126 additions and 2 deletions

View File

@@ -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);