diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-03-03 17:39:51 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:41 (GMT) |
commit | 7c6e3f75e0b593f6a0eb32973041150657d593a2 (patch) | |
tree | 2e06aa794643f1b2fc43ea89ae396e619aee4623 /src | |
parent | 3038b29a9bfe2ee9fc1b72fa2c0dc0a6bece753b (diff) | |
download | Qt-7c6e3f75e0b593f6a0eb32973041150657d593a2.zip Qt-7c6e3f75e0b593f6a0eb32973041150657d593a2.tar.gz Qt-7c6e3f75e0b593f6a0eb32973041150657d593a2.tar.bz2 |
Place cursor at the end of the selected range
Selected range is the range of the text that has been edited with
input method, but not yet committed, normally the cursor should be
placed that the end of it (or hidden).
Task-number: QTBUG-17923
Reviewed-by: Morten Sørvig
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 61012d5..03b6b17 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1297,7 +1297,7 @@ static int qCocoaViewCount = 0; QString qtText; // Cursor position is retrived from the range. QList<QInputMethodEvent::Attribute> attrs; - attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selRange.location, 1, QVariant()); + attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selRange.location + selRange.length, 1, QVariant()); if ([aString isKindOfClass:[NSAttributedString class]]) { qtText = QCFString::toQString(reinterpret_cast<CFStringRef>([aString string])); composingLength = qtText.length(); |