diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-05-21 11:26:12 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-23 14:18:34 +0200 |
commit | 2d05d3bd2815c220474b3c07bf3f2ef7417d3070 (patch) | |
tree | 6034d95b5b0cf5b20af06e03cf153bc66d91402a /src/testlib/qsignaldumper_p.h | |
parent | b4aa5d970d7701174b15f50f032138e96b427915 (diff) |
Cocoa: don't send input method events for basic text input
When receiving keyDown events on the Mac, we pass them to NSView's
interpretKeyEvents method, which ends up calling our insertText method.
This means we end up sending input method events for most text input
(instead of normal key events). While this is not wrong, it is
unexpected, and different form how Qt 4 works.
Change insertText to do nothing if no preedit string has been set when
handling a key event. For normal text input that does not need input
method handling, we can simply return and let handleKeyEvent send key
events instead.
Our insertText implementation has to take care to not ignore calls from
outside key event processing (such as the user input characters with the
Character Viewer). As a result m_keyEventsAccepted changes to
m_sendKeyEvent to let insertText know whether or not insertText was
called via handleKeyEvent.
Change-Id: Ie8c2eb67f6a8438f08442f9ff48f2027a041ca23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/testlib/qsignaldumper_p.h')
0 files changed, 0 insertions, 0 deletions