Android input method fix
Let textBeforeCursor return the text immediately before the cursor, and not the text at the beginning of the paragraph, even if that is also technically before the cursor. (Apparently I do not know the difference between left and right.) Change-Id: I6043ebe53838e68880b6407dbb9e5370bc785c1b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
dcfd36c268
commit
6e26bd5fa2
@ -690,7 +690,7 @@ QString QAndroidInputContext::getTextBeforeCursor(jint length, jint /*flags*/)
|
||||
{
|
||||
QVariant textBefore = queryFocusObjectThreadSafe(Qt::ImTextBeforeCursor, QVariant(length));
|
||||
if (textBefore.isValid()) {
|
||||
return textBefore.toString().left(length) + m_composingText;
|
||||
return textBefore.toString().right(length) + m_composingText;
|
||||
}
|
||||
|
||||
//compatibility code for old controls that do not implement the new API
|
||||
|
Loading…
Reference in New Issue
Block a user