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:
@@ -212,11 +212,8 @@ void ModeManager::objectAdded(QObject *obj)
|
||||
// and still expect the current shortcut to change with it
|
||||
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
|
||||
== currentCmd->defaultKeySequence());
|
||||
#ifdef Q_OS_MAC
|
||||
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Meta+%1").arg(i+1)));
|
||||
#else
|
||||
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Ctrl+%1").arg(i+1)));
|
||||
#endif
|
||||
currentCmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString::fromLatin1("Meta+%1").arg(i+1)
|
||||
: QString::fromLatin1("Ctrl+%1").arg(i+1)));
|
||||
if (currentlyHasDefaultSequence)
|
||||
currentCmd->setKeySequence(currentCmd->defaultKeySequence());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user