summaryrefslogtreecommitdiffstats
path: root/logic/lists
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-04 01:40:51 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-04 01:40:51 +0100
commit7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458 (patch)
tree3d508443d43b1c468ae6be261cb8403169dbe850 /logic/lists
parentb82eb5873e99dce6aec735b08929e3add52e53e7 (diff)
downloadMultiMC-7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458.tar
MultiMC-7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458.tar.gz
MultiMC-7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458.tar.lz
MultiMC-7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458.tar.xz
MultiMC-7839c4ecc01aad4c5d34a6d06b2dfc4afdc58458.zip
Pave.
Diffstat (limited to 'logic/lists')
-rw-r--r--logic/lists/InstanceList.cpp8
-rw-r--r--logic/lists/InstanceList.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/logic/lists/InstanceList.cpp b/logic/lists/InstanceList.cpp
index 0d4eab95..935f9fd3 100644
--- a/logic/lists/InstanceList.cpp
+++ b/logic/lists/InstanceList.cpp
@@ -33,6 +33,7 @@
#include "logic/BaseInstance.h"
#include "logic/InstanceFactory.h"
#include "logger/QsLog.h"
+#include <gui/groupview/GroupView.h>
const static int GROUP_FILE_FORMAT_VERSION = 1;
@@ -96,8 +97,7 @@ QVariant InstanceList::data(const QModelIndex &index, int role) const
return MMC->icons()->getIcon(key);
}
// for now.
- case KCategorizedSortFilterProxyModel::CategorySortRole:
- case KCategorizedSortFilterProxyModel::CategoryDisplayRole:
+ case GroupViewRoles::GroupRole:
{
return pdata->group();
}
@@ -585,10 +585,8 @@ void InstanceList::propertiesChanged(BaseInstance *inst)
}
InstanceProxyModel::InstanceProxyModel(QObject *parent)
- : KCategorizedSortFilterProxyModel(parent)
+ : GroupedProxyModel(parent)
{
- // disable since by default we are globally sorting by date:
- setCategorizedModel(true);
}
bool InstanceProxyModel::subSortLessThan(const QModelIndex &left,
diff --git a/logic/lists/InstanceList.h b/logic/lists/InstanceList.h
index 0ce808e5..cda51a03 100644
--- a/logic/lists/InstanceList.h
+++ b/logic/lists/InstanceList.h
@@ -18,7 +18,7 @@
#include <QObject>
#include <QAbstractListModel>
#include <QSet>
-#include "categorizedsortfilterproxymodel.h"
+#include <gui/groupview/GroupedProxyModel.h>
#include <QIcon>
#include "logic/BaseInstance.h"
@@ -129,7 +129,7 @@ protected:
QSet<QString> m_groups;
};
-class InstanceProxyModel : public KCategorizedSortFilterProxyModel
+class InstanceProxyModel : public GroupedProxyModel
{
public:
explicit InstanceProxyModel(QObject *parent = 0);