summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-05-07 18:45:35 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-05-08 11:28:35 (GMT)
commit813835f67a1053561eba67bf958eb39c0f4eedfe (patch)
treeaba4f5d40d54c8858bbc8dd80453a2d981e36b2e /src/gui
parent42e2070925d012845db9cf85e597a17851a0dcb6 (diff)
downloadQt-813835f67a1053561eba67bf958eb39c0f4eedfe.zip
Qt-813835f67a1053561eba67bf958eb39c0f4eedfe.tar.gz
Qt-813835f67a1053561eba67bf958eb39c0f4eedfe.tar.bz2
Fix QCompleter with UnfilteredPopupCompletion
Fixes regression introduced in a794ded85f74516239a08cf848e6b4f8b6dcac6a. When using UnfilteredPopupCompletion the matchCount is always zero and completion was being skipped. By adding the check for showAll we still avoid the assert but retain correct behavior. Task-number: 253125 Reviewed-by: jasplin
Diffstat (limited to 'src/gui')
-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 a622385..faa4e7b 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -824,7 +824,7 @@ void QCompleterPrivate::_q_complete(QModelIndex index, bool highlighted)
Q_Q(QCompleter);
QString completion;
- if (!index.isValid() || (index.row() >= proxy->engine->matchCount())) {
+ if (!index.isValid() || (!proxy->showAll && (index.row() >= proxy->engine->matchCount()))) {
completion = prefix;
} else {
QModelIndex si = proxy->mapToSource(index);