Browse Source

Merge pull request #13820 from Chocobo1/sorting

Fix wrong data used for comparison
adaptive-webui-19844
Mike Tzou 4 years ago committed by GitHub
parent
commit
84623ac1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/gui/torrentcontentfiltermodel.cpp
  2. 1
      src/gui/transferlistsortmodel.cpp

1
src/gui/torrentcontentfiltermodel.cpp

@ -42,6 +42,7 @@ TorrentContentFilterModel::TorrentContentFilterModel(QObject *parent)
setFilterRole(TorrentContentModel::UnderlyingDataRole); setFilterRole(TorrentContentModel::UnderlyingDataRole);
setDynamicSortFilter(true); setDynamicSortFilter(true);
setSortCaseSensitivity(Qt::CaseInsensitive); setSortCaseSensitivity(Qt::CaseInsensitive);
setSortRole(TorrentContentModel::UnderlyingDataRole);
} }
TorrentContentModel *TorrentContentFilterModel::model() const TorrentContentModel *TorrentContentFilterModel::model() const

1
src/gui/transferlistsortmodel.cpp

@ -41,6 +41,7 @@
TransferListSortModel::TransferListSortModel(QObject *parent) TransferListSortModel::TransferListSortModel(QObject *parent)
: QSortFilterProxyModel {parent} : QSortFilterProxyModel {parent}
{ {
setSortRole(TransferListModel::UnderlyingDataRole);
QMetaType::registerComparators<BitTorrent::TorrentState>(); QMetaType::registerComparators<BitTorrent::TorrentState>();
} }

Loading…
Cancel
Save