completion: get rid of custom_filter (see #545)
This commit is contained in:
parent
d079caafa8
commit
caf5937585
@ -133,13 +133,3 @@ class BaseCompletionModel(QStandardItemModel):
|
|||||||
Override QAbstractItemModel::sort.
|
Override QAbstractItemModel::sort.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def custom_filter(self, pattern, row, parent):
|
|
||||||
"""Custom filter.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
pattern: The current filter pattern.
|
|
||||||
row: The row to accept or reject in the filter.
|
|
||||||
parent: The parent item QModelIndex.
|
|
||||||
"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
@ -140,9 +140,6 @@ class CompletionFilterModel(QSortFilterProxyModel):
|
|||||||
if parent == QModelIndex() or not self.pattern:
|
if parent == QModelIndex() or not self.pattern:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
try:
|
|
||||||
return self.srcmodel.custom_filter(self.pattern, row, parent)
|
|
||||||
except NotImplementedError:
|
|
||||||
for col in self.srcmodel.columns_to_filter:
|
for col in self.srcmodel.columns_to_filter:
|
||||||
idx = self.srcmodel.index(row, col, parent)
|
idx = self.srcmodel.index(row, col, parent)
|
||||||
if not idx.isValid():
|
if not idx.isValid():
|
||||||
|
Loading…
Reference in New Issue
Block a user