summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2011-10-20 15:49:26 +0300
committerQt by Nokia <qt-info@nokia.com>2011-10-24 03:31:10 +0200
commit29aa93387b2f5f1c1874e265fa5c6a83543f54fa (patch)
treefbf6597ac70231822a0e81473797da7370997ce2 /src/widgets/widgets
parent3172631f0d40f34249f376f9b94a40919573d0c7 (diff)
Multiline editors not to limit anchor position inputMethodQuery
The queries were limited to current block, because that is the available surrounding text. Input method side, however, cannot then distinguish between anchor being really at start or end of the surrounding text, or beyond it. Without the limitation there at least is a way to know anchor is at unknown territory. Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index b2a38c3c47..c645955a8c 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -2006,7 +2006,7 @@ QVariant QWidgetTextControl::inputMethodQuery(Qt::InputMethodQuery property) con
case Qt::ImMaximumTextLength:
return QVariant(); // No limit.
case Qt::ImAnchorPosition:
- return QVariant(qBound(0, d->cursor.anchor() - block.position(), block.length()));
+ return QVariant(d->cursor.anchor() - block.position());
default:
return QVariant();
}