From 2c8a0a90bee274d36aa2c4c6ad112b8a634100a7 Mon Sep 17 00:00:00 2001 From: Pasi Matilainen Date: Tue, 17 Jan 2012 13:08:42 +0200 Subject: Fix cursor disappearance in QLineEdit on Mac when deleting all text On Mac OS X, if all text in the QLineEdit was selected and then deleted, cursor visibility was not updated, and so the cursor remained hidden. Fixed to update cursor visibility also when the text is empty. Task-number: QTBUG-13169 Change-Id: Id52a20b07bb96609a78c42eb630ee2b20ed7cbcb Reviewed-by: Jiang Jiang (cherry picked from commit 181456d0a31b7250da97eafba75e6bc657391777) --- src/widgets/widgets/qlineedit_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index c54f60f62e..78b1c60842 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -133,7 +133,7 @@ void QLineEditPrivate::_q_editFocusChange(bool e) void QLineEditPrivate::_q_selectionChanged() { Q_Q(QLineEdit); - if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) { + if (control->preeditAreaText().isEmpty()) { QStyleOptionFrameV2 opt; q->initStyleOption(&opt); bool showCursor = control->hasSelectedText() ? -- cgit v1.2.3