mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02: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
1 changed files with 3 additions and 3 deletions
|
|
@ -291,9 +291,9 @@ def sort(self, col, order, reset=True):
|
|||
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…
Reference in a new issue