summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-12 10:38:22 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-12 10:38:22 (GMT)
commitcc957f4cb1a8dce2fb1eb406f54ccecb4092d238 (patch)
tree5463704092728f10a58931fba7a2a74fa71f73d0 /src/gui/kernel/qevent.cpp
parentf14620878beed97c85c4b6a03a38f485800328d1 (diff)
parent8c0cdfdd4772e81164d838b9549e8c554ecf5966 (diff)
downloadQt-cc957f4cb1a8dce2fb1eb406f54ccecb4092d238.zip
Qt-cc957f4cb1a8dce2fb1eb406f54ccecb4092d238.tar.gz
Qt-cc957f4cb1a8dce2fb1eb406f54ccecb4092d238.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r--src/gui/kernel/qevent.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 4c31d33..15f0511 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -862,6 +862,17 @@ bool QKeyEvent::matches(QKeySequence::StandardKey matchKey) const
uint searchkey = (modifiers() | key()) & ~(Qt::KeypadModifier); //The keypad modifier should not make a difference
uint platform = QApplicationPrivate::currentPlatform();
+#ifdef Q_WS_MAC
+ if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
+ uint oldSearchKey = searchkey;
+ searchkey &= ~(Qt::ControlModifier | Qt::MetaModifier);
+ if (oldSearchKey & Qt::ControlModifier)
+ searchkey |= Qt::MetaModifier;
+ if (oldSearchKey & Qt::MetaModifier)
+ searchkey |= Qt::ControlModifier;
+ }
+#endif
+
uint N = QKeySequencePrivate::numberOfKeyBindings;
int first = 0;
int last = N - 1;