Removed casefold() function call when using a custom filter.
This commit is contained in:
parent
1b24cfd618
commit
5bca951c21
@ -140,13 +140,12 @@ class CompletionFilterModel(QSortFilterProxyModel):
|
||||
if not self.pattern:
|
||||
return True
|
||||
|
||||
pattern = self.pattern.casefold()
|
||||
try:
|
||||
return self.srcmodel.custom_filter(pattern, row, parent)
|
||||
return self.srcmodel.custom_filter(self.pattern, row, parent)
|
||||
except NotImplementedError:
|
||||
if not data:
|
||||
return False
|
||||
return pattern in data.casefold()
|
||||
return self.pattern.casefold() in data.casefold()
|
||||
|
||||
def intelligentLessThan(self, lindex, rindex):
|
||||
"""Custom sorting implementation.
|
||||
|
@ -107,7 +107,7 @@ class UrlCompletionModel(base.BaseCompletionModel):
|
||||
index1 = self.index(row, 1, parent)
|
||||
url = self.data(index0) or ''
|
||||
title = self.data(index1) or ''
|
||||
return pattern in url.casefold() or pattern in title.casefold()
|
||||
return pattern.casefold() in url.casefold() or pattern.casefold() in title.casefold()
|
||||
|
||||
@config.change_filter('completion', 'timestamp-format')
|
||||
def reformat_timestamps(self):
|
||||
|
Loading…
Reference in New Issue
Block a user