mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-13 00:26:10 +00:00
CInstancesProxyModel: Make use of override
This commit is contained in:
parent
c3b724a94b
commit
e86c396a6d
@ -6,13 +6,13 @@
|
|||||||
class CInstancesProxyModel : public QSortFilterProxyModel
|
class CInstancesProxyModel : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CInstancesProxyModel(QObject *pParent = 0)
|
explicit CInstancesProxyModel(QObject *pParent = nullptr)
|
||||||
: QSortFilterProxyModel(pParent)
|
: QSortFilterProxyModel(pParent)
|
||||||
{
|
{
|
||||||
setSortCaseSensitivity(Qt::CaseInsensitive);
|
setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool lessThan(const QModelIndex& rkLeft, const QModelIndex& rkRight) const
|
bool lessThan(const QModelIndex& rkLeft, const QModelIndex& rkRight) const override
|
||||||
{
|
{
|
||||||
// Don't sort from the top two levels and don't sort the Show column
|
// Don't sort from the top two levels and don't sort the Show column
|
||||||
if (rkLeft.parent() == QModelIndex() || rkLeft.parent().parent() == QModelIndex() || rkLeft.column() == 2)
|
if (rkLeft.parent() == QModelIndex() || rkLeft.parent().parent() == QModelIndex() || rkLeft.column() == 2)
|
||||||
@ -22,7 +22,6 @@ public:
|
|||||||
else
|
else
|
||||||
return rkLeft.row() > rkRight.row();
|
return rkLeft.row() > rkRight.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString Left = sourceModel()->data(rkLeft).toString();
|
QString Left = sourceModel()->data(rkLeft).toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user