From 862f8d318846a6dfdd49dc7a754ffb8c56be6289 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 8 Jun 2017 08:43:53 -0400 Subject: [PATCH] Always return col 0 for index parent. This was changed during code review but was causing Qt errors while TAB-completing in the selection view: 08:42:34 WARNING qt Unknown module:none:0 Can't select indexes from different model or with different parents --- qutebrowser/completion/models/completionmodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/completion/models/completionmodel.py b/qutebrowser/completion/models/completionmodel.py index 2dec0ed46..2d74d94e0 100644 --- a/qutebrowser/completion/models/completionmodel.py +++ b/qutebrowser/completion/models/completionmodel.py @@ -134,7 +134,7 @@ class CompletionModel(QAbstractItemModel): # categories have no parent return QModelIndex() row = self._categories.index(parent_cat) - return self.createIndex(row, index.column(), None) + return self.createIndex(row, 0, None) def rowCount(self, parent=QModelIndex()): """Override QAbstractItemModel::rowCount."""