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
committed by sledgehammer999
parent 8bee69c9fc
commit 8c48bf4a70
2 changed files with 2 additions and 0 deletions

View File

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