From 4700a32f214eaa54ae4ddddd06936d6ca85dd72f Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 18 Aug 2017 14:11:37 +0200 Subject: 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 --- src/plugins/platforms/android/qandroidinputcontext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/android') 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; -- cgit v1.2.3