diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-02-23 13:21:53 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-02-23 14:27:43 (GMT) |
commit | 5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a (patch) | |
tree | 35f80840f4693e0a54ff2a19dde9608946699a03 /src/gui/widgets | |
parent | f6ea3f09eac800109a3a60ea96f7fcbd5d5aa0d4 (diff) | |
download | Qt-5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a.zip Qt-5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a.tar.gz Qt-5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a.tar.bz2 |
QLineEdit shows leftovers of edit cursor after clear()
The commit 0568fb9f428a84a344baaa5c53395db4b99f082c introduced this
regression. Make sure that we have text in the lineedit before showing
the cursor.
Task-number: QTBUG-7826
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlineedit_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index 1aa7a2b..2c76a5c 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -129,7 +129,7 @@ void QLineEditPrivate::_q_editFocusChange(bool e) void QLineEditPrivate::_q_selectionChanged() { Q_Q(QLineEdit); - if (control->preeditAreaText().isEmpty()) { + if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) { QStyleOptionFrameV2 opt; q->initStyleOption(&opt); bool showCursor = control->hasSelectedText() ? |