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: Id26ce707130777fcd0ab1a4cff08367bb2810f2f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>bb10
parent
b6634023fa
commit
e2102752ba
|
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue