summaryrefslogtreecommitdiffstats
path: root/logic/icons
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/icons
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/icons')
-rw-r--r--logic/icons/IconList.cpp7
-rw-r--r--logic/icons/IconList.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/logic/icons/IconList.cpp b/logic/icons/IconList.cpp
index 6db8b035..964d61e9 100644
--- a/logic/icons/IconList.cpp
+++ b/logic/icons/IconList.cpp
@@ -20,14 +20,15 @@
#include <QMimeData>
#include <QUrl>
#include <QFileSystemWatcher>
-#include <MultiMC.h>
+#include <QSet>
+#include <logger/QsLog.h>
#define MAX_SIZE 1024
-IconList::IconList(QString path, QObject *parent) : QAbstractListModel(parent)
+IconList::IconList(QString builtinPath, QString path, QObject *parent) : QAbstractListModel(parent)
{
// add builtin icons
- QDir instance_icons(":/icons/instances/");
+ QDir instance_icons(builtinPath);
auto file_info_list = instance_icons.entryInfoList(QDir::Files, QDir::Name);
for (auto file_info : file_info_list)
{
diff --git a/logic/icons/IconList.h b/logic/icons/IconList.h
index 8687eba6..124ecf27 100644
--- a/logic/icons/IconList.h
+++ b/logic/icons/IconList.h
@@ -23,6 +23,7 @@
#include <memory>
#include "MMCIcon.h"
#include "logic/settings/Setting.h"
+#include "logic/Env.h" // there is a global icon list inside Env.
class QFileSystemWatcher;
@@ -30,7 +31,7 @@ class IconList : public QAbstractListModel
{
Q_OBJECT
public:
- explicit IconList(QString path, QObject *parent = 0);
+ explicit IconList(QString builtinPath, QString path, QObject *parent = 0);
virtual ~IconList() {};
QIcon getIcon(QString key);