summaryrefslogtreecommitdiffstats
path: root/src/gui/util
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-04-03 12:28:07 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-04-03 12:28:07 (GMT)
commit0ac4fd86b62f418b4e366afa86c75d7775e9da90 (patch)
treea9ca9c8b924de174c9958e69df361440bb6b74aa /src/gui/util
parent0bb93751c80109a13f6391c8bbfb74693b484699 (diff)
parentf9e0b4e7d57b568ab20b7c77e284f966ff6baf41 (diff)
downloadQt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.zip
Qt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.tar.gz
Qt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.tar.bz2
Merge branch '4.5'
Diffstat (limited to 'src/gui/util')
-rw-r--r--src/gui/util/qcompleter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index aeb7e91..7571dfe 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -1079,7 +1079,14 @@ void QCompleter::setPopup(QAbstractItemView *popup)
popup->setModel(d->proxy);
popup->hide();
popup->setParent(0, Qt::Popup);
+
+ Qt::FocusPolicy origPolicy;
+ if (d->widget)
+ origPolicy = d->widget->focusPolicy();
popup->setFocusPolicy(Qt::NoFocus);
+ if (d->widget)
+ d->widget->setFocusPolicy(origPolicy);
+
popup->setFocusProxy(d->widget);
popup->installEventFilter(this);
popup->setItemDelegate(new QCompleterItemDelegate(popup));