From 9a77d6c409b991957fc069a2b47476a419ea1aab Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Thu, 23 Jul 2009 16:21:32 +0200 Subject: Finish up my AA_DontSwapMetaAndControl feature. Ugh. The whole reason I added this was so that the text() would be preserved for people that did stuff with Control. Somehow in all the other fixes I did, I forgot to actually do that part. Reviewed-by: Denis --- src/gui/kernel/qkeymapper_mac.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp index 017c13c..8eee665 100644 --- a/src/gui/kernel/qkeymapper_mac.cpp +++ b/src/gui/kernel/qkeymapper_mac.cpp @@ -729,8 +729,10 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e QString text(ourChar); /* This is actually wrong - but unfortunatly it is the best that can be done for now because of the Control/Meta mapping problems */ - if (modifiers & (Qt::ControlModifier | Qt::MetaModifier)) + if (modifiers & (Qt::ControlModifier | Qt::MetaModifier) + && !qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) { text = QString(); + } if (widget) { -- cgit v0.12