summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-04-23 11:13:07 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-04-23 11:13:07 (GMT)
commit466d7562a40eb0c2cf72f57fce0bc5e9b0de37c2 (patch)
tree1bee31c272ccfa88ca16cdd5fbe2ea58ff89f5b4 /src/gui
parentf353a5d9acde9a0234cbba547317f8014e004027 (diff)
parente30e3bb524536ef0f6b55272901b24bbbd4dfbd6 (diff)
downloadQt-466d7562a40eb0c2cf72f57fce0bc5e9b0de37c2.zip
Qt-466d7562a40eb0c2cf72f57fce0bc5e9b0de37c2.tar.gz
Qt-466d7562a40eb0c2cf72f57fce0bc5e9b0de37c2.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qkeymapper_mac.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp
index f259654..a7145d4 100644
--- a/src/gui/kernel/qkeymapper_mac.cpp
+++ b/src/gui/kernel/qkeymapper_mac.cpp
@@ -756,14 +756,23 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e
return true;
}
- if (qApp->inputContext() && qApp->inputContext()->isComposing()) {
+ QInputContext *currentContext = qApp->inputContext();
+ if (currentContext && currentContext->isComposing()) {
if (ekind == kEventRawKeyDown) {
- QMacInputContext *context = qobject_cast<QMacInputContext*>(qApp->inputContext());
+ QMacInputContext *context = qobject_cast<QMacInputContext*>(currentContext);
if (context)
context->setLastKeydownEvent(event);
}
return false;
}
+ // Once we process the key down , we dont need to send the saved event again from
+ // kEventTextInputUnicodeForKeyEvent, so clear it.
+ if (currentContext && ekind == kEventRawKeyDown) {
+ QMacInputContext *context = qobject_cast<QMacInputContext*>(currentContext);
+ if (context)
+ context->setLastKeydownEvent(0);
+ }
+
//get modifiers
Qt::KeyboardModifiers modifiers;
int qtKey;