From b722cc1dec6ce86e8f1499879dcc4859430b09c5 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Tue, 20 Jun 2017 22:11:53 -0400 Subject: [PATCH] Pass invalid index to [can]FetchMore. For QSqlQueryModel, the argument should always be an invalid index: http://doc.qt.io/qt-5/qsqlquerymodel.html#canFetchMore For a QStandardItemModel, it doesn't matter. Either way, passing the top-level parent index was wrong. --- qutebrowser/completion/models/completionmodel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/completion/models/completionmodel.py b/qutebrowser/completion/models/completionmodel.py index 62148e9d3..deef088cf 100644 --- a/qutebrowser/completion/models/completionmodel.py +++ b/qutebrowser/completion/models/completionmodel.py @@ -161,14 +161,14 @@ class CompletionModel(QAbstractItemModel): """Override to forward the call to the categories.""" cat = self._cat_from_idx(parent) if cat: - return cat.canFetchMore(parent) + return cat.canFetchMore(QModelIndex()) return False def fetchMore(self, parent): """Override to forward the call to the categories.""" cat = self._cat_from_idx(parent) if cat: - cat.fetchMore(parent) + cat.fetchMore(QModelIndex()) def count(self): """Return the count of non-category items."""