This commit is contained in:
Florian Bruhin 2014-03-09 20:31:40 +01:00
parent a19571fe21
commit e61d7f724f
3 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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)