summaryrefslogtreecommitdiffstats
path: root/logic/InstanceList.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-02-01 11:44:47 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-12 20:57:16 +0200
commitaa70ed2244700dbcc93c1fadb22edc1c1caede37 (patch)
tree79fc6703e984edc4d631be8c6f40c71400f88aba /logic/InstanceList.cpp
parent154d19bb74f4c5fc1519aa40cd9dfd20244273a1 (diff)
downloadMultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar
MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.gz
MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.lz
MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.xz
MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.zip
SCRATCH move icons over to Env, instance proxy model to gui
Diffstat (limited to 'logic/InstanceList.cpp')
-rw-r--r--logic/InstanceList.cpp22
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;
- }
-}