summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit_p.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-03-09 14:39:40 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-03-09 14:46:04 (GMT)
commit42b69b1383375a52818758bf89198e8dc97902d3 (patch)
tree30b0257ea2276daac64416ffdc2ca09c0b1ee86c /src/gui/widgets/qlineedit_p.cpp
parent6ccf78b9675f50691bd6abc878c2b0d5281c0a51 (diff)
downloadQt-42b69b1383375a52818758bf89198e8dc97902d3.zip
Qt-42b69b1383375a52818758bf89198e8dc97902d3.tar.gz
Qt-42b69b1383375a52818758bf89198e8dc97902d3.tar.bz2
Cursor would remain in a non-focused QLineEdit after clearing its selection
QLineEditPrivate::_q_selectionChanged() did not take into account whether the widget had focus. Reviewed-by: Olivier Task-number: QTBUG-8634
Diffstat (limited to 'src/gui/widgets/qlineedit_p.cpp')
-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 2c76a5c..468c111 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -134,7 +134,7 @@ void QLineEditPrivate::_q_selectionChanged()
q->initStyleOption(&opt);
bool showCursor = control->hasSelectedText() ?
q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q):
- true;
+ q->hasFocus();
setCursorVisible(showCursor);
}