diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-05-19 16:07:42 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-05-20 10:10:34 +0000 |
commit | 938f9fc0f8ff1575413ca3d6d66860b5fa315768 (patch) | |
tree | b265d9b00091b0916000bc946547f2305fa77909 /src/plugins/platforms/android | |
parent | 189280026f091716dfda91ff652cc20b299683c2 (diff) |
Workaround for Samsung keyboard bug
Return null string instead of empty string when the selection is
empty. It looks like Samsung just tests for selection == null when
doing backspace.
Task-number: QTBUG-45785
Change-Id: Iaa006a8ffe52b2704c7348646dde9ca4e1f78c5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/android')
-rw-r--r-- | src/plugins/platforms/android/qandroidinputcontext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp index 7e81735de9..7264f9a74c 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.cpp +++ b/src/plugins/platforms/android/qandroidinputcontext.cpp @@ -176,6 +176,8 @@ static jstring getSelectedText(JNIEnv *env, jobject /*thiz*/, jint flags) #ifdef QT_DEBUG_ANDROID_IM_PROTOCOL qDebug() << "@@@ GETSEL" << text; #endif + if (text.isEmpty()) + return 0; return env->NewString(reinterpret_cast<const jchar *>(text.constData()), jsize(text.length())); } |