forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user