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