diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 1a24f6c61..43b9db257 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -18,12 +18,10 @@ """Configuration storage and config-related utilities.""" import os -import io import os.path import logging import textwrap -from configparser import (ConfigParser, ExtendedInterpolation, NoSectionError, - NoOptionError) +from configparser import ConfigParser, ExtendedInterpolation #from qutebrowser.utils.misc import read_file import qutebrowser.config.configdata as configdata diff --git a/qutebrowser/models/completion.py b/qutebrowser/models/completion.py index 16e72372d..d12968f55 100644 --- a/qutebrowser/models/completion.py +++ b/qutebrowser/models/completion.py @@ -271,8 +271,10 @@ class CompletionModel(QAbstractItemModel): """ if parent.model() is not None and parent.model() is not self: - logging.debug("row {}, column {}, parent {}, parentmodel {}, self {}".format(row, column, parent, parent.model(), self)) - from qutebrowser.utils.debug import set_trace; set_trace() + logging.warn("index() called with wrong parent! - " + "row {}, column {}, parentmodel {}, self {}".format( + row, column, parent.model(), self)) + return if (0 <= row < self.rowCount(parent) and 0 <= column < self.columnCount(parent)): pass diff --git a/qutebrowser/models/completionfilter.py b/qutebrowser/models/completionfilter.py index 55e5815e6..0ba6709be 100644 --- a/qutebrowser/models/completionfilter.py +++ b/qutebrowser/models/completionfilter.py @@ -79,6 +79,7 @@ class CompletionFilterModel(QSortFilterProxyModel): return self.index(self.rowCount(cat) - 1, 0, cat) def setSourceModel(self, model): + """Override QSortFilterProxyModel's setSourceModel to clear pattern.""" logging.debug("Setting source model: {}".format(model)) self.pattern = '' super().setSourceModel(model)