cleanup
This commit is contained in:
parent
a19571fe21
commit
e61d7f724f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user