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 <jiang.jiang@nokia.com>
(cherry picked from commit 181456d0a31b7250da97eafba75e6bc657391777)
bb10
Pasi Matilainen 2012-01-17 13:08:42 +02:00 committed by Qt by Nokia
parent 06abf7934b
commit 2c8a0a90be
1 changed files with 1 additions and 1 deletions

View File

@ -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() ?