1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Merge pull request #13820 from Chocobo1/sorting

Fix wrong data used for comparison
This commit is contained in:
Mike Tzou 2020-11-27 10:20:02 +08:00 committed by GitHub
commit 84623ac1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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>();
} }