diff options
Diffstat (limited to 'src/plugins/platforms/android/qandroidinputcontext.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidinputcontext.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp index 521d3086b57..5d539d7da43 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.cpp +++ b/src/plugins/platforms/android/qandroidinputcontext.cpp @@ -1131,21 +1131,13 @@ bool QAndroidInputContext::focusObjectStopComposing() m_composingCursor = -1; - { - // commit the composing test - QList<QInputMethodEvent::Attribute> attributes; - QInputMethodEvent event(QString(), attributes); - event.setCommitString(m_composingText); - sendInputMethodEvent(&event); - } - { - // Moving Qt's cursor to where the preedit cursor used to be - QList<QInputMethodEvent::Attribute> attributes; - attributes.append( - QInputMethodEvent::Attribute(QInputMethodEvent::Selection, localCursorPos, 0)); - QInputMethodEvent event(QString(), attributes); - sendInputMethodEvent(&event); - } + // commit composing text and cursor position + QList<QInputMethodEvent::Attribute> attributes; + attributes.append( + QInputMethodEvent::Attribute(QInputMethodEvent::Selection, localCursorPos, 0)); + QInputMethodEvent event(QString(), attributes); + event.setCommitString(m_composingText); + sendInputMethodEvent(&event); return true; } |