summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeymapper_mac.cpp
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-04-23 08:31:39 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-04-23 09:04:44 (GMT)
commite30e3bb524536ef0f6b55272901b24bbbd4dfbd6 (patch)
tree47412bc70f36934f2949a3c26e85f78894825bce /src/gui/kernel/qkeymapper_mac.cpp
parentfc4c398e323a501331afe13e6bf2a15dd8003cef (diff)
downloadQt-e30e3bb524536ef0f6b55272901b24bbbd4dfbd6.zip
Qt-e30e3bb524536ef0f6b55272901b24bbbd4dfbd6.tar.gz
Qt-e30e3bb524536ef0f6b55272901b24bbbd4dfbd6.tar.bz2
Diacritic input broken, duplicate the base glypha (on Mac OS X carbon)
This was a regression introduced by 8da880e77db04c. The saved key event needs to be cleared if we process a valid raw key event. Task-number: QTBUG-7099 Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui/kernel/qkeymapper_mac.cpp')
-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;