diff options
author | axis <qt-info@nokia.com> | 2009-05-29 12:42:35 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-06-03 09:23:15 (GMT) |
commit | 6545932efa45ea2b8fbc1459d760ec5f15c63120 (patch) | |
tree | b82c0a567ac39a522d25d29e61956103c021ec91 /src | |
parent | a014c0746cf9d4dfb8ba8c0e67060d577c09dd3c (diff) | |
download | Qt-6545932efa45ea2b8fbc1459d760ec5f15c63120.zip Qt-6545932efa45ea2b8fbc1459d760ec5f15c63120.tar.gz Qt-6545932efa45ea2b8fbc1459d760ec5f15c63120.tar.bz2 |
Revert "Changed the behavior of ImCursorPosition slightly."
This reverts commit ce02d0e9e0ad8d8ac47e4f3ee95bac5cb74ed184.
This turned out not to be enough for proper selection support
together with S60 FEP. Instead we will revert the behavior and add
new API.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qlineedit.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index c74af23..f6092bb 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1865,7 +1865,7 @@ QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const case Qt::ImFont: return QVariant(d->cursor.charFormat().font()); case Qt::ImCursorPosition: - return QVariant(d->cursor.selectionEnd() - block.position()); + return QVariant(d->cursor.position() - block.position()); case Qt::ImSurroundingText: return QVariant(block.text()); case Qt::ImCurrentSelection: diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 0d8e16f..61b8786 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -2337,7 +2337,7 @@ QVariant QLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const case Qt::ImFont: return font(); case Qt::ImCursorPosition: - return QVariant((d->selend - d->selstart == 0) ? d->cursor : d->selend); + return QVariant(d->cursor); case Qt::ImSurroundingText: return QVariant(d->text); case Qt::ImCurrentSelection: |