py3: fix sort method being called with implicit parameters

Passing None as the first argument in order to not use cmp, is not
portable.
This commit is contained in:
Eli Schwartz 2019-04-18 02:47:29 -04:00
parent 52f915d707
commit 69cf3d345a
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -291,9 +291,9 @@ class Matches(QAbstractItemModel):
if not self.matches:
return
descending = order == Qt.DescendingOrder
self.all_matches.sort(None,
lambda x: sort_key(unicode_type(self.data_as_text(x, col))),
descending)
self.all_matches.sort(
key=lambda x: sort_key(unicode_type(self.data_as_text(x, col))),
reverse=descending)
self.reorder_matches()
if reset:
self.beginResetModel(), self.endResetModel()