From 389feab1df2f1f93a8b4c6b6832165642dcb958d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 12 Mar 2015 15:35:53 +0100 Subject: [PATCH] Make sure args are not int in new_item(). Otherwise we would construct a QStandardItem with the QStandardItem(int rows, int columns = 1) constructor, which will most likely not do what we want. --- qutebrowser/completion/models/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qutebrowser/completion/models/base.py b/qutebrowser/completion/models/base.py index 9d86d57c0..2ab545317 100644 --- a/qutebrowser/completion/models/base.py +++ b/qutebrowser/completion/models/base.py @@ -73,6 +73,9 @@ class BaseCompletionModel(QStandardItemModel): Return: A (nameitem, descitem, miscitem) tuple. """ + assert not isinstance(name, int) + assert not isinstance(desc, int) + assert not isinstance(misc, int) nameitem = QStandardItem(name) descitem = QStandardItem(desc) if misc is None: