summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPasi Matilainen <pasi.matilainen@digia.com>2012-01-17 11:08:42 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-01-17 12:04:35 (GMT)
commit181456d0a31b7250da97eafba75e6bc657391777 (patch)
tree6a396cd977a6018d8716b156ee1731d6104ed950
parenta2fb94037bc15ae904d455762b069f4e9434285f (diff)
downloadQt-181456d0a31b7250da97eafba75e6bc657391777.zip
Qt-181456d0a31b7250da97eafba75e6bc657391777.tar.gz
Qt-181456d0a31b7250da97eafba75e6bc657391777.tar.bz2
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>
-rw-r--r--src/gui/widgets/qlineedit_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 7fb4dac..30cdb90 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -132,7 +132,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() ?