Skip to content

Commit aa00926

Browse files
committed
GameList: Move sort order handling into model lessThan and remove duplicate logic
1 parent 1235ded commit aa00926

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

pcsx2-qt/GameList/GameListWidget.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@ class GameListSortModel final : public QSortFilterProxyModel
118118

119119
bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override
120120
{
121-
const auto lock = GameList::GetLock();
122-
const GameList::Entry* left = GameList::GetEntryByIndex(source_left.row());
123-
const GameList::Entry* right = GameList::GetEntryByIndex(source_right.row());
124-
125-
// Favorites always sort to the top regardless of column or sort direction.
126-
127-
if (left && right && left->is_favorite != right->is_favorite)
128-
return sortOrder() == Qt::AscendingOrder ? left->is_favorite : right->is_favorite;
129-
130121
return m_model->lessThan(source_left, source_right, source_left.column(), sortOrder());
131122
}
132123

0 commit comments

Comments
 (0)