refactor: adapt rest of the codebase to the new resource model

In order to access the ModFolderModel from the ModFolderPage, i created
a new m_model for the correct type, shadowing the m_model of type
ResourceFolderModel. This creates two shared_ptr references to the same object,
but since they will have the same lifetime, it doesn't generate a memory
leak.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-08-10 14:48:34 -03:00
parent 256f8094f5
commit 97a74d5c1f
27 changed files with 235 additions and 263 deletions

View File

@ -50,7 +50,8 @@ public:
Mod() = default;
Mod(const QFileInfo &file);
explicit Mod(const QDir& mods_dir, const Metadata::ModStruct& metadata);
Mod(const QDir& mods_dir, const Metadata::ModStruct& metadata);
Mod(QString file_path) : Mod(QFileInfo(file_path)) {}
auto enabled() const -> bool { return m_enabled; }