summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2014-04-03 09:47:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-18 07:45:04 +0200
commit6e26bd5fa26489034fe5d035bb4c5034455aa24d (patch)
tree051330cddd34b183ead606670adfe68e25f14e11 /src
parentdcfd36c2686bcbd56b6a0295640e228f76d7bf1d (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index 12005d8fce..02fda19d76 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -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