mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
52f915d707
commit
69cf3d345a
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user