fix(memory leak): don't give shared pointers out to foldermodels (causes cyclic refrence)

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-05-28 02:15:39 -07:00
parent 37420405c7
commit a04a6f1e0d
17 changed files with 46 additions and 51 deletions

View File

@ -50,7 +50,7 @@ public:
IconFileRole
};
WorldList(const QString &dir, std::shared_ptr<const BaseInstance> instance);
WorldList(const QString &dir, BaseInstance* instance);
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
@ -128,7 +128,7 @@ signals:
void changed();
protected:
std::shared_ptr<const BaseInstance> m_instance;
BaseInstance* m_instance;
QFileSystemWatcher *m_watcher;
bool is_watching;
QDir m_dir;