refactor: pass instance ptr to resource models. use it to find instance root.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include <QAbstractListModel>
|
||||
#include <QMimeData>
|
||||
#include "minecraft/World.h"
|
||||
#include "BaseInstance.h"
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
||||
@ -49,7 +50,7 @@ public:
|
||||
IconFileRole
|
||||
};
|
||||
|
||||
WorldList(const QString &dir);
|
||||
WorldList(const QString &dir, std::shared_ptr<const BaseInstance> instance);
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
|
||||
@ -127,6 +128,7 @@ signals:
|
||||
void changed();
|
||||
|
||||
protected:
|
||||
std::shared_ptr<const BaseInstance> m_instance;
|
||||
QFileSystemWatcher *m_watcher;
|
||||
bool is_watching;
|
||||
QDir m_dir;
|
||||
|
Reference in New Issue
Block a user