summaryrefslogtreecommitdiffstats
path: root/logic/icons
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-31 16:59:03 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 11:30:24 +0200
commit6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (patch)
tree28aaf76918d1ff0ffe2a437573bb1ab7a012c4ec /logic/icons
parente508728246043fcaf8bee565e73b15e15eb2e531 (diff)
downloadMultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.gz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.lz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.xz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.zip
NOISSUE Split MultiMC app object into MultiMC and Env
Diffstat (limited to 'logic/icons')
-rw-r--r--logic/icons/IconList.cpp8
-rw-r--r--logic/icons/IconList.h7
2 files changed, 5 insertions, 10 deletions
diff --git a/logic/icons/IconList.cpp b/logic/icons/IconList.cpp
index 217255a1..6db8b035 100644
--- a/logic/icons/IconList.cpp
+++ b/logic/icons/IconList.cpp
@@ -15,18 +15,16 @@
#include "IconList.h"
#include <pathutils.h>
-#include "logic/settings/SettingsObject.h"
#include <QMap>
#include <QEventLoop>
#include <QMimeData>
#include <QUrl>
#include <QFileSystemWatcher>
#include <MultiMC.h>
-#include <logic/settings/Setting.h>
#define MAX_SIZE 1024
-IconList::IconList(QObject *parent) : QAbstractListModel(parent)
+IconList::IconList(QString path, QObject *parent) : QAbstractListModel(parent)
{
// add builtin icons
QDir instance_icons(":/icons/instances/");
@@ -43,10 +41,6 @@ IconList::IconList(QObject *parent) : QAbstractListModel(parent)
SLOT(directoryChanged(QString)));
connect(m_watcher.get(), SIGNAL(fileChanged(QString)), SLOT(fileChanged(QString)));
- auto setting = MMC->settings()->getSetting("IconsDir");
- QString path = setting->get().toString();
- connect(setting.get(), SIGNAL(SettingChanged(const Setting &, QVariant)),
- SLOT(SettingChanged(const Setting &, QVariant)));
directoryChanged(path);
}
diff --git a/logic/icons/IconList.h b/logic/icons/IconList.h
index 1952eba4..8687eba6 100644
--- a/logic/icons/IconList.h
+++ b/logic/icons/IconList.h
@@ -30,7 +30,7 @@ class IconList : public QAbstractListModel
{
Q_OBJECT
public:
- explicit IconList(QObject *parent = 0);
+ explicit IconList(QString path, QObject *parent = 0);
virtual ~IconList() {};
QIcon getIcon(QString key);
@@ -64,9 +64,10 @@ private:
IconList &operator=(const IconList &) = delete;
void reindex();
-protected
-slots:
+public slots:
void directoryChanged(const QString &path);
+
+protected slots:
void fileChanged(const QString &path);
void SettingChanged(const Setting & setting, QVariant value);
private: