summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qcompleter.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-09-10 09:34:39 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-09-10 09:54:30 (GMT)
commit7691e70a130df66e4597c9fe1ada03496c8c5ba0 (patch)
tree80d22a2d969d5ee18932878f4c6862fdd10f05ab /src/gui/util/qcompleter.cpp
parent199ef040b29953a1f0ca694b1430564571e744fe (diff)
downloadQt-7691e70a130df66e4597c9fe1ada03496c8c5ba0.zip
Qt-7691e70a130df66e4597c9fe1ada03496c8c5ba0.tar.gz
Qt-7691e70a130df66e4597c9fe1ada03496c8c5ba0.tar.bz2
Fix focus policy propagation in QCompleter on QWS
setParent(0) can change the focus policy, so let's retrieve the original value a bit earlier. Reviewed-by: jasplin
Diffstat (limited to 'src/gui/util/qcompleter.cpp')
-rw-r--r--src/gui/util/qcompleter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 5a44352..30bccfb 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -1083,11 +1083,11 @@ void QCompleter::setPopup(QAbstractItemView *popup)
#else
popup->hide();
#endif
- popup->setParent(0, Qt::Popup);
Qt::FocusPolicy origPolicy = Qt::NoFocus;
if (d->widget)
origPolicy = d->widget->focusPolicy();
+ popup->setParent(0, Qt::Popup);
popup->setFocusPolicy(Qt::NoFocus);
if (d->widget)
d->widget->setFocusPolicy(origPolicy);