summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidinputcontext.cpp
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kdab.com>2016-12-08 13:42:16 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2016-12-13 05:14:40 +0000
commit36e4b13e29ef055c2b05a526cb65529d88b03582 (patch)
treed8bb423ba71b46fe472a5fea3b06b0428bd3cf7e /src/plugins/platforms/android/qandroidinputcontext.cpp
parentbb0f29f82b934b489f1679b7b72f094aa287be3c (diff)
Android: fix (partially) text deletion when the cursor is moved
- wait until the handle location changes the cursor position - don't update cursor position if: * a batchEdit is in progress * the UpdateSelection is blocked - finish the composing before update the cursor - add the missing .java files There are still corner situations when the text gets deleted/moved, but those are pretty rare and they will be fix in another patch. Task-number: QTBUG-57507 Change-Id: I230d7f64625fb556e1be3069694a71e9bc91323a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidinputcontext.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index 2656d45d5f..12e85046f8 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -578,6 +578,11 @@ void QAndroidInputContext::updateSelectionHandles()
*/
void QAndroidInputContext::handleLocationChanged(int handleId, int x, int y)
{
+ if (m_batchEditNestingLevel.load() || m_blockUpdateSelection)
+ return;
+
+ finishComposingText();
+
auto im = qGuiApp->inputMethod();
auto leftRect = im->cursorRectangle();
// The handle is down of the cursor, but we want the position in the middle.