Hello community, here is the log from the commit of package calibre for openSUSE:Factory checked in at 2019-07-11 13:14:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/calibre (Old) and /work/SRC/openSUSE:Factory/.calibre.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "calibre" Thu Jul 11 13:14:17 2019 rev:210 rq:713098 version:3.44.0 Changes: -------- --- /work/SRC/openSUSE:Factory/calibre/calibre.changes 2019-07-01 10:44:44.805513881 +0200 +++ /work/SRC/openSUSE:Factory/.calibre.new.4615/calibre.changes 2019-07-11 13:14:20.602850169 +0200 @@ -1,0 +2,6 @@ +Tue Jul 2 15:27:14 UTC 2019 - Ave Milia <[email protected]> + +- workaround Qt 5.13 regression in QTableView::sortByColumn() + * calibre-fix-qt5.13-sortByColumn.patch + +------------------------------------------------------------------- New: ---- calibre-fix-qt5.13-sortByColumn.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ calibre.spec ++++++ --- /var/tmp/diff_new_pack.lzWehm/_old 2019-07-11 13:14:21.482849806 +0200 +++ /var/tmp/diff_new_pack.lzWehm/_new 2019-07-11 13:14:21.486849805 +0200 @@ -32,9 +32,14 @@ Patch2: %{name}-setup.install.py.diff # PATCH-FIX-OPENSUSE: disabling Autoupdate Searcher Patch3: %{name}-no-update.diff -# Make it build against Qt 5.13. Remove when kovidgoyal/calibre@0a5dc07 is -# included in release version. +# Make it build against Qt 5.13. +# Remove when kovidgoyal/calibre@0a5dc07 is included in release version. Patch4: %{name}-fix-qt5.13-compat.patch +# Workaround Qt 5.13 regression in QTableView::sortByColumn(). +# Upstream tracking bug: https://bugs.launchpad.net/calibre/+bug/1834989 +# Qt tracking bug: https://bugreports.qt.io/browse/QTBUG-76850 +# Remove when kovidgoyal/calibre@8088902 is included in release version. +Patch5: %{name}-fix-qt5.13-sortByColumn.patch BuildRequires: fdupes BuildRequires: help2man BuildRequires: hicolor-icon-theme @@ -179,6 +184,7 @@ %patch2 -p1 %patch3 -p1 -b .no-update %patch4 -p1 +%patch5 -p1 # dos2unix newline conversion sed -i 's/\r//' src/calibre/web/feeds/recipes/* ++++++ calibre-fix-qt5.13-sortByColumn.patch ++++++ Index: calibre-3.44.0/src/calibre/gui2/actions/match_books.py =================================================================== --- calibre-3.44.0.orig/src/calibre/gui2/actions/match_books.py +++ calibre-3.44.0/src/calibre/gui2/actions/match_books.py @@ -17,7 +17,7 @@ class MatchBookAction(InterfaceAction): action_spec = (_('Match book to library'), 'book.png', _('Match this book to a book in the library'), ()) - dont_add_to = frozenset(['menubar', 'toolbar', 'context-menu', 'toolbar-child', 'context-menu-cover-browser']) + dont_add_to = frozenset(('menubar', 'toolbar', 'context-menu', 'toolbar-child', 'context-menu-cover-browser')) action_type = 'current' def genesis(self): Index: calibre-3.44.0/src/calibre/gui2/dialogs/edit_authors_dialog.py =================================================================== --- calibre-3.44.0.orig/src/calibre/gui2/dialogs/edit_authors_dialog.py +++ calibre-3.44.0/src/calibre/gui2/dialogs/edit_authors_dialog.py @@ -97,7 +97,6 @@ class EditAuthorsDialog(QDialog, Ui_Edit self.sort_by_author.clicked.connect(self.do_sort_by_author) self.author_order = 1 - self.table.sortByColumn(1, Qt.AscendingOrder) self.sort_by_author_sort.clicked.connect(self.do_sort_by_author_sort) self.sort_by_author_sort.setCheckable(True) self.sort_by_author_sort.setChecked(True) @@ -138,7 +137,8 @@ class EditAuthorsDialog(QDialog, Ui_Edit self.not_found_label_timer_event, type=Qt.QueuedConnection) self.table.setContextMenuPolicy(Qt.CustomContextMenu) - self.table.customContextMenuRequested .connect(self.show_context_menu) + self.table.customContextMenuRequested.connect(self.show_context_menu) + self.do_sort_by_author_sort() def save_state(self): self.table_column_widths = [] Index: calibre-3.44.0/src/calibre/gui2/library/models.py =================================================================== --- calibre-3.44.0.orig/src/calibre/gui2/library/models.py +++ calibre-3.44.0/src/calibre/gui2/library/models.py @@ -500,7 +500,7 @@ class BooksModel(QAbstractTableModel): self.searched.emit(True) self.search_done.emit() - def sort(self, col, order, reset=True): + def sort(self, col, order=Qt.AscendingOrder, reset=True): if not self.db: return if not isinstance(order, bool): Index: calibre-3.44.0/src/calibre/gui2/library/views.py =================================================================== --- calibre-3.44.0.orig/src/calibre/gui2/library/views.py +++ calibre-3.44.0/src/calibre/gui2/library/views.py @@ -511,17 +511,18 @@ class BooksView(QTableView): # {{{ ch.blockSignals(False) def sort_by_column_and_order(self, col, ascending): + order = Qt.AscendingOrder if ascending else Qt.DescendingOrder self.column_header.blockSignals(True) - self.sortByColumn(col, Qt.AscendingOrder if ascending else Qt.DescendingOrder) + self.column_header.setSortIndicator(col, order) self.column_header.blockSignals(False) + self.model().sort(col, order) if self.is_library_view: self.set_sort_indicator(col, ascending) def user_sort_requested(self, col, order=Qt.AscendingOrder): - if col >= len(self.column_map) or col < 0: - return QTableView.sortByColumn(self, col) - field = self.column_map[col] - self.intelligent_sort(field, order == Qt.AscendingOrder) + if 0 <= col < len(self.column_map): + field = self.column_map[col] + self.intelligent_sort(field, order == Qt.AscendingOrder) def pin_view_user_sort_requested(self, col, order=Qt.AscendingOrder): if col < len(self.column_map) and col >= 0: Index: calibre-3.44.0/src/calibre/gui2/tweak_book/spell.py =================================================================== --- calibre-3.44.0.orig/src/calibre/gui2/tweak_book/spell.py +++ calibre-3.44.0/src/calibre/gui2/tweak_book/spell.py @@ -1055,7 +1055,7 @@ class SpellCheck(Dialog): if self.words_model.sort_on[0] == 0: with self: hh = self.words_view.horizontalHeader() - self.words_view.sortByColumn(hh.sortIndicatorSection(), hh.sortIndicatorOrder()) + self.words_view.model().sort(hh.sortIndicatorSection(), hh.sortIndicatorOrder()) def search_type_changed(self): tprefs['spell_check_case_sensitive_search'] = bool(self.case_sensitive_search.isChecked())
