Move settings lib into the main code, fixing error logging in it.
This commit is contained in:
@ -15,14 +15,14 @@
|
||||
|
||||
#include "IconList.h"
|
||||
#include <pathutils.h>
|
||||
#include <settingsobject.h>
|
||||
#include "logic/settings/SettingsObject.h"
|
||||
#include <QMap>
|
||||
#include <QEventLoop>
|
||||
#include <QMimeData>
|
||||
#include <QUrl>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <MultiMC.h>
|
||||
#include <setting.h>
|
||||
#include <logic/settings/Setting.h>
|
||||
|
||||
#define MAX_SIZE 1024
|
||||
|
||||
@ -45,8 +45,8 @@ IconList::IconList(QObject *parent) : QAbstractListModel(parent)
|
||||
|
||||
auto setting = MMC->settings()->getSetting("IconsDir");
|
||||
QString path = setting->get().toString();
|
||||
connect(setting.get(), SIGNAL(settingChanged(const Setting &, QVariant)),
|
||||
SLOT(settingChanged(const Setting &, QVariant)));
|
||||
connect(setting.get(), SIGNAL(SettingChanged(const Setting &, QVariant)),
|
||||
SLOT(SettingChanged(const Setting &, QVariant)));
|
||||
directoryChanged(path);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ void IconList::fileChanged(const QString &path)
|
||||
emit iconUpdated(key);
|
||||
}
|
||||
|
||||
void IconList::settingChanged(const Setting &setting, QVariant value)
|
||||
void IconList::SettingChanged(const Setting &setting, QVariant value)
|
||||
{
|
||||
if(setting.id() != "IconsDir")
|
||||
return;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QtGui/QIcon>
|
||||
#include <memory>
|
||||
#include "MMCIcon.h"
|
||||
#include "setting.h"
|
||||
#include "logic/settings/Setting.h"
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
||||
@ -68,7 +68,7 @@ protected
|
||||
slots:
|
||||
void directoryChanged(const QString &path);
|
||||
void fileChanged(const QString &path);
|
||||
void settingChanged(const Setting & setting, QVariant value);
|
||||
void SettingChanged(const Setting & setting, QVariant value);
|
||||
private:
|
||||
std::shared_ptr<QFileSystemWatcher> m_watcher;
|
||||
bool is_watching;
|
||||
|
Reference in New Issue
Block a user