From cffd1633b267d0034627756296e61abcc0ef50be Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 7 Aug 2013 14:23:18 +0200 Subject: Fix QCompleter::activated(QModelIndex) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When falling back to the completion prefix, make sure to also pass an invalid index to activated(). Change-Id: I6b282a01c95492466890632b77837bcc96eb038a Reviewed-by: Stephen Kelly Reviewed-by: Thorbjørn Lund Martsum --- src/widgets/util/qcompleter.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 64b7b12e90..18c8ed2bd2 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -829,6 +829,7 @@ void QCompleterPrivate::_q_complete(QModelIndex index, bool highlighted) if (!index.isValid() || (!proxy->showAll && (index.row() >= proxy->engine->matchCount()))) { completion = prefix; + index = QModelIndex(); } else { if (!(index.flags() & Qt::ItemIsEnabled)) return; -- cgit v1.2.3