summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-29 13:10:38 (GMT)
committeraxis <qt-info@nokia.com>2009-06-03 11:16:37 (GMT)
commit0cd99b1b5363a0e06dd660ba0322ef216481f8f7 (patch)
tree5f356fdf9389c4332ce90c99ef7443e8ec12c927 /src/gui/widgets/qlineedit.cpp
parent7b95b70bc307288bd8ba2b84108f91fdea315826 (diff)
downloadQt-0cd99b1b5363a0e06dd660ba0322ef216481f8f7.zip
Qt-0cd99b1b5363a0e06dd660ba0322ef216481f8f7.tar.gz
Qt-0cd99b1b5363a0e06dd660ba0322ef216481f8f7.tar.bz2
Made QLineEdit respect the new Qt::ImAnchorPosition.
RevBy: Trust me AutoTest: Will add in later commit
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index c031098..d9e39d3 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2373,6 +2373,13 @@ QVariant QLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const
return QVariant(selectedText());
case Qt::ImMaximumTextLength:
return QVariant(maxLength());
+ case Qt::ImAnchorPosition:
+ if (d->selstart == d->selend)
+ return QVariant(d->cursor);
+ else if (d->selstart == d->cursor)
+ return QVariant(d->selend);
+ else
+ return QVariant(d->selstart);
default:
return QVariant();
}