From befb7bec1b87d559ef6e72ee5944382a1fe6b39f Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Tue, 19 Oct 2010 17:25:08 +0200 Subject: 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 --- src/gui/util/qcompleter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12