1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-05 03:14:44 +00:00

Fix wrong data used for comparison

In torrent transfer list we should use underlying data for sorting, not
displayed values.

Closes #13818.
This commit is contained in:
Chocobo1 2020-11-26 00:25:42 +08:00
parent 9c938b91b7
commit 13c4581c86
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
2 changed files with 2 additions and 0 deletions

View File

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

View File

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