summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2013-12-16 14:56:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-20 11:11:34 +0100
commit8e2f95e5a2ebc54c600d1db416b1dd84e433d115 (patch)
tree9e9b6c467c3278dbcefef9ec0e75148473e08851 /src/plugins/platforms
parentac90b4c46f11ec08a9f4eebf909f9c66f10e4288 (diff)
Fixed another assert in qwindowskeymapper
When we get a WM_CHAR message we do not need to add anything to the key map as these messages already contain the character code in question. Task-number: QTBUG-35532 Change-Id: If73993cd873b7c616876b9ba52ceba6b27a6a7b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 2743ef029d..1baea6faff 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -743,8 +743,11 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
return true;
}
- // Add this key to the keymap if it is not present yet.
- updateKeyMap(msg);
+ // WM_CHAR messages already contain the character in question so there is
+ // no need to fiddle with our key map. In any other case add this key to the
+ // keymap if it is not present yet.
+ if (msg.message != WM_CHAR)
+ updateKeyMap(msg);
MSG peekedMsg;
// consume dead chars?(for example, typing '`','a' resulting in a-accent).