diff options
author | Zeno Albisser <zeno.albisser@nokia.com> | 2010-10-19 15:25:08 (GMT) |
---|---|---|
committer | Zeno Albisser <zeno.albisser@nokia.com> | 2010-10-20 09:32:11 (GMT) |
commit | befb7bec1b87d559ef6e72ee5944382a1fe6b39f (patch) | |
tree | 93fd5251cbbe198fd6e258d3fc946a95813a8c07 | |
parent | 065c1e4fd2029dbe7485a884d3cc2d06584a29bb (diff) | |
download | Qt-befb7bec1b87d559ef6e72ee5944382a1fe6b39f.zip Qt-befb7bec1b87d559ef6e72ee5944382a1fe6b39f.tar.gz Qt-befb7bec1b87d559ef6e72ee5944382a1fe6b39f.tar.bz2 |
Make QCompleter return current parent instead of invalid index
This fixes the issue of showing drive D: when completion is used
in QFileDialog to display suggestions for folders to change into
in path C:/.
Task-number: QTBUG-14072
Reviewed-by: Olivier Goffart
-rw-r--r-- | src/gui/util/qcompleter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index e718212..fdd0fc5 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -220,7 +220,7 @@ QModelIndex QCompletionModel::mapToSource(const QModelIndex& index) const { Q_D(const QCompletionModel); if (!index.isValid()) - return QModelIndex(); + return engine->curParent; int row; QModelIndex parent = engine->curParent; |