summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 06:54:51 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 06:54:51 (GMT)
commite7935dc46fcc062b28cc3aa385f389fa3842b190 (patch)
tree1559e188c8a4f3f149d5880e52f31ee996f4be2b /src/gui/widgets
parent54796e0d3150df7dd94e715c095c21fb227139ee (diff)
parentfc4d386f2cc8984b98957d83d8cdb57c1105890f (diff)
downloadQt-e7935dc46fcc062b28cc3aa385f389fa3842b190.zip
Qt-e7935dc46fcc062b28cc3aa385f389fa3842b190.tar.gz
Qt-e7935dc46fcc062b28cc3aa385f389fa3842b190.tar.bz2
Merge commit 'staging-1/4.7' into doc-4.7
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index a32c257..35fed0c 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -419,7 +419,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
int c = m_cursor; // cursor position after insertion of commit string
- if (event->replacementStart() == 0)
+ if (event->replacementStart() <= 0)
c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength());
m_cursor += event->replacementStart();
@@ -464,8 +464,6 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
if (a.type == QInputMethodEvent::Cursor) {
m_preeditCursor = a.start;
m_hideCursor = !a.length;
- if (m_hideCursor)
- setCursorBlinkPeriod(0);
} else if (a.type == QInputMethodEvent::TextFormat) {
QTextCharFormat f = qvariant_cast<QTextFormat>(a.value).toCharFormat();
if (f.isValid()) {
@@ -529,7 +527,7 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl
int cursor = m_cursor;
if (m_preeditCursor != -1)
cursor += m_preeditCursor;
- if (!m_hideCursor && (!m_blinkPeriod || m_blinkStatus))
+ if(!m_blinkPeriod || m_blinkStatus)
m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth);
}
}