Replaced deprecated QVariant::operator< by QVariant::compare for Qt 6

This commit is contained in:
thunder2 2025-07-22 21:10:34 +02:00
parent 79a8b3143f
commit 8d497dce0a
2 changed files with 8 additions and 0 deletions

View file

@ -219,7 +219,11 @@ public:
if(left_is_not_pinned ^ right_is_not_pinned)
return (m_header->sortIndicatorOrder()==Qt::AscendingOrder)?right_is_not_pinned:left_is_not_pinned ; // always put pinned posts on top
#if QT_VERSION >= QT_VERSION_CHECK (6, 0, 0)
return QVariant::compare(left.data(RsGxsForumModel::SortRole), right.data(RsGxsForumModel::SortRole)) < 0;
#else
return left.data(RsGxsForumModel::SortRole) < right.data(RsGxsForumModel::SortRole) ;
#endif
}
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override