summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-25 09:01:23 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-25 09:04:57 (GMT)
commit9073a38e2ad3342291e9b2e68cf120a2faba06b0 (patch)
tree33f3f068c1314d9628a57325bdfdb4eadd3bda5d /src/gui
parent5b5c098bda20cab7825207640cc69230c1864586 (diff)
downloadQt-9073a38e2ad3342291e9b2e68cf120a2faba06b0.zip
Qt-9073a38e2ad3342291e9b2e68cf120a2faba06b0.tar.gz
Qt-9073a38e2ad3342291e9b2e68cf120a2faba06b0.tar.bz2
Make sure the cursor of the lineedit doesn't blink when a key is pressed
This was a regression against 4.5 Task-number: QTBUG-4944 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qlineedit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 3800224..785b2bd 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1411,6 +1411,8 @@ bool QLineEdit::event(QEvent * e)
QTimer::singleShot(0, this, SLOT(_q_handleWindowActivate()));
}else if(e->type() == QEvent::ShortcutOverride){
d->control->processEvent(e);
+ } else if (e->type() == QEvent::KeyRelease) {
+ d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime());
}
#ifdef QT_KEYPAD_NAVIGATION
@@ -1615,6 +1617,8 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
}
#endif
d->control->processKeyEvent(event);
+ if (event->isAccepted())
+ d->control->setCursorBlinkPeriod(0);
}
/*!