diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-13 23:00:15 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-13 23:00:15 (GMT) |
commit | 4b1664447940a4674d0551f626561a30cfa3ce8f (patch) | |
tree | b2b9e8e74bfc52339ff2d95c0b927544567aeea9 /src/gui | |
parent | 21fd6c0d818f3f4a3efa8904c8ddbfeb3a1e931d (diff) | |
parent | ff60c64c30a2e889b7a894b7b4b38484b7dfe31a (diff) | |
download | Qt-4b1664447940a4674d0551f626561a30cfa3ce8f.zip Qt-4b1664447940a4674d0551f626561a30cfa3ce8f.tar.gz Qt-4b1664447940a4674d0551f626561a30cfa3ce8f.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 9 | ||||
-rw-r--r-- | src/gui/widgets/qlinecontrol_p.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index f338f40..5ea9dc4 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1308,6 +1308,15 @@ void QLineControl::setCursorBlinkPeriod(int msec) m_blinkPeriod = msec; } +void QLineControl::resetCursorBlinkTimer() +{ + if (m_blinkPeriod == 0 || m_blinkTimer == 0) + return; + killTimer(m_blinkTimer); + m_blinkTimer = startTimer(m_blinkPeriod / 2); + m_blinkStatus = 1; +} + void QLineControl::timerEvent(QTimerEvent *event) { if (event->timerId() == m_blinkTimer) { diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index 7068f62..d881acf 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -296,6 +296,7 @@ public: int cursorBlinkPeriod() const { return m_blinkPeriod; } void setCursorBlinkPeriod(int msec); + void resetCursorBlinkTimer(); QString cancelText() const { return m_cancelText; } void setCancelText(const QString &text) { m_cancelText = text; } |