diff options
Diffstat (limited to 'logic/InstanceList.cpp')
-rw-r--r-- | logic/InstanceList.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/logic/InstanceList.cpp b/logic/InstanceList.cpp index db85bcfc..b6ac38a8 100644 --- a/logic/InstanceList.cpp +++ b/logic/InstanceList.cpp @@ -97,7 +97,7 @@ QVariant InstanceList::data(const QModelIndex &index, int role) const case Qt::DecorationRole: { QString key = pdata->iconKey(); - return MMC->icons()->getIcon(key); + return ENV.icons()->getIcon(key); } // for now. case GroupViewRoles::GroupRole: @@ -547,23 +547,3 @@ void InstanceList::propertiesChanged(BaseInstance *inst) emit dataChanged(index(i), index(i)); } } - -InstanceProxyModel::InstanceProxyModel(QObject *parent) : GroupedProxyModel(parent) -{ -} - -bool InstanceProxyModel::subSortLessThan(const QModelIndex &left, - const QModelIndex &right) const -{ - BaseInstance *pdataLeft = static_cast<BaseInstance *>(left.internalPointer()); - BaseInstance *pdataRight = static_cast<BaseInstance *>(right.internalPointer()); - QString sortMode = MMC->settings()->get("InstSortMode").toString(); - if (sortMode == "LastLaunch") - { - return pdataLeft->lastLaunch() > pdataRight->lastLaunch(); - } - else - { - return QString::localeAwareCompare(pdataLeft->name(), pdataRight->name()) < 0; - } -} |