mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 02:46:59 +03:00
Loads of stuff, amongst others d&d and many bug fixes
This commit is contained in:
parent
ccbf341dc8
commit
525f508d94
3 changed files with 568 additions and 175 deletions
|
|
@ -8,5 +8,14 @@ CategorizedProxyModel::CategorizedProxyModel(QObject *parent)
|
|||
}
|
||||
bool CategorizedProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
return left.data(CategorizedView::CategoryRole).toString() < right.data(CategorizedView::CategoryRole).toString();
|
||||
const QString leftCategory = left.data(CategorizedView::CategoryRole).toString();
|
||||
const QString rightCategory = right.data(CategorizedView::CategoryRole).toString();
|
||||
if (leftCategory == rightCategory)
|
||||
{
|
||||
return left.row() < right.row();
|
||||
}
|
||||
else
|
||||
{
|
||||
return leftCategory < rightCategory;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue