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

@@ -174,7 +174,11 @@ 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
connect(m_postEditorAction, SIGNAL(triggered()), this, SLOT(postEditor()));
cpContainer->addAction(command);
@@ -185,7 +189,11 @@ 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
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
cpContainer->addAction(command);