QAndroidInputContext: Fix most "Input method out of sync" warnings
According to Android docs start == end in a call to setComposingRegion() means finish composing. But this case was not being handled properly: m_composingText was being assigned an empty string, but m_composingTextStart was being assigned the value of start, which is never -1. There is one other possible cause of "Input method out of sync" warnings, but it is tightly coupled with another bug, so it will be fixed by a separate commit. Change-Id: Ie475df84f330453ce4fc623e8b631b435d7d0042 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
parent
73ca3dbf49
commit
d0741f4267
|
|
@ -1231,6 +1231,8 @@ jboolean QAndroidInputContext::setComposingRegion(jint start, jint end)
|
|||
if (query.isNull())
|
||||
return JNI_FALSE;
|
||||
|
||||
if (start == end)
|
||||
return JNI_TRUE;
|
||||
if (start > end)
|
||||
qSwap(start, end);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue