From 97a74d5c1f00a11d331a41b16690f7202fe102a3 Mon Sep 17 00:00:00 2001 From: flow Date: Wed, 10 Aug 2022 14:48:34 -0300 Subject: 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 --- launcher/minecraft/mod/ResourcePackFolderModel.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'launcher/minecraft/mod/ResourcePackFolderModel.h') diff --git a/launcher/minecraft/mod/ResourcePackFolderModel.h b/launcher/minecraft/mod/ResourcePackFolderModel.h index d2a5bf18..1fe82867 100644 --- a/launcher/minecraft/mod/ResourcePackFolderModel.h +++ b/launcher/minecraft/mod/ResourcePackFolderModel.h @@ -2,9 +2,13 @@ #include "ResourceFolderModel.h" +#include "ResourcePack.h" + class ResourcePackFolderModel : public ResourceFolderModel { Q_OBJECT public: explicit ResourcePackFolderModel(const QString &dir); + + RESOURCE_HELPERS(ResourcePack) }; -- cgit