Merge pull request #7307 from booto/qsortfilter-strict-weak

GameList: QSortFilterProxyModel should provide strict weak ordering
This commit is contained in:
Pierre Bourdon 2018-08-11 02:57:36 +02:00 committed by GitHub
commit 55fa4842fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ bool ListProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_
bool ListProxyModel::lessThan(const QModelIndex& left, const QModelIndex& right) const
{
if (left.data(Qt::InitialSortOrderRole) != right.data(Qt::InitialSortOrderRole))
return !QSortFilterProxyModel::lessThan(left, right);
return QSortFilterProxyModel::lessThan(right, left);
// If two items are otherwise equal, compare them by their title
const auto right_title =