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:
Paul Olav Tvete 2014-04-03 09:47:32 +02:00 committed by The Qt Project
parent dcfd36c268
commit 6e26bd5fa2

View File

@ -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