summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-04-23 08:31:39 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:06:12 (GMT)
commit51ff257a5cd423469770b3f1eae8b350ffb8ae8b (patch)
treebe1754a8283553863b37b73c5f3ee323e179c259 /src/gui
parenta8bdabd1c8538f43a17a64ccc93d3df604d18bae (diff)
downloadQt-51ff257a5cd423469770b3f1eae8b350ffb8ae8b.zip
Qt-51ff257a5cd423469770b3f1eae8b350ffb8ae8b.tar.gz
Qt-51ff257a5cd423469770b3f1eae8b350ffb8ae8b.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 (cherry picked from commit e30e3bb524536ef0f6b55272901b24bbbd4dfbd6)
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 fe950fd..e3bd466 100644
--- a/src/gui/kernel/qkeymapper_mac.cpp
+++ b/src/gui/kernel/qkeymapper_mac.cpp
@@ -717,14 +717,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;