summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-08-18 14:11:37 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2017-08-21 07:26:00 +0000
commit4700a32f214eaa54ae4ddddd06936d6ca85dd72f (patch)
tree1714933d52f4a40c54e14e5ba139b7622c6d599f /src
parent2282ca44e4ab41d0b680d0f3481746c8b03a5770 (diff)
Android: stop composing before pasting new text
We have to exit composition mode before inserting text. Otherwise, the state of the input method will be out of sync with the contents of the text editor. Task-number: QTBUG-61717 Change-Id: I58bf3988ae9e0acf3302e810e46bb0ebeda30d17 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index 279cb338f4..7fa809f3f8 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -303,7 +303,7 @@ static jboolean paste(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
- qDebug("@@@");
+ qDebug("@@@ PASTE");
#endif
return m_androidInputContext->paste();
}
@@ -1138,6 +1138,7 @@ jboolean QAndroidInputContext::copyURL()
jboolean QAndroidInputContext::paste()
{
+ finishComposingText();
m_cursorHandleShown = CursorHandleNotShown;
sendShortcut(QKeySequence::Paste);
return JNI_TRUE;