summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol_p.h
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-21 14:54:18 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-21 14:54:18 (GMT)
commit06ee48f7ad7f5ab8bdbaed765d301fa2c0b417fb (patch)
tree1190374f252dd0c91c9b88a7f8e967f922636cb8 /src/gui/widgets/qlinecontrol_p.h
parent87ca0fa9389b7ef77e179b6db7ddc970b7228d6c (diff)
downloadQt-06ee48f7ad7f5ab8bdbaed765d301fa2c0b417fb.zip
Qt-06ee48f7ad7f5ab8bdbaed765d301fa2c0b417fb.tar.gz
Qt-06ee48f7ad7f5ab8bdbaed765d301fa2c0b417fb.tar.bz2
Make sure cursor is painted at the correct position when we are using IM.
When the line edit was refactored into a line control this regression was introduced. This regression was introduced by change fb7d86cf23227302d48db279ec589221d11a1f6a. Task-number: QTBUG-4789 Reviewed-by: Alan Alpert
Diffstat (limited to 'src/gui/widgets/qlinecontrol_p.h')
-rw-r--r--src/gui/widgets/qlinecontrol_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index 301ff72..d6f2705 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -549,7 +549,10 @@ inline qreal QLineControl::cursorToX(int cursor) const
inline qreal QLineControl::cursorToX() const
{
- return cursorToX(m_cursor);
+ int cursor = m_cursor;
+ if (m_preeditCursor != -1)
+ cursor += m_preeditCursor;
+ return cursorToX(cursor);
}
inline bool QLineControl::isReadOnly() const