diff options
author | Vova Mshanetskiy <vovams163@gmail.com> | 2019-05-06 15:00:55 +0300 |
---|---|---|
committer | Vova Mshanetskiy <vovams163@gmail.com> | 2019-06-05 17:38:32 +0300 |
commit | 710435ee81c4cf48d66f07eff3cbad3eaef80ab8 (patch) | |
tree | 88221c9a8c2c2b8360ed7e4a4e975381357a8e4e /src/corelib | |
parent | 0c1831178540462da31fd7a4b6d2e446bc84498b (diff) |
QAndroidInputContext: Fix unneeded preedit commits when dragging handles
If the cursor handle was dragged by only a few pixels, position of the
cursor did not actually change, but finishComposingText() was called
anyway. So the keyboard was thinking that nothing changed and a word is
still being composed, but the app was thinking that there is no preedit
string. This was resulting in invalid handling of following key presses.
This commit essentially inlines
QPlatformInputContext::setSelectionOnFocusObject() into
QAndroidInputContext::handleLocationChanged(). This allows us to call
finishComposingText() and to send a QInputMethodEvent only when position
of the cursur actually changes. This also allows us to add a
QInputMethodEvent::Cursor attribute into the event for consistency with
QAndroidInputContext::longPress().
Change-Id: I2fc82f138f717991f34024cdf521236845dc0adf
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/corelib')
0 files changed, 0 insertions, 0 deletions