change: make Mod a QObject used as a pointer

Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-26 14:17:15 -03:00
parent fac63541a4
commit c4316e81e6
19 changed files with 229 additions and 216 deletions

View File

@ -12,7 +12,7 @@ class CheckUpdateTask : public Task {
Q_OBJECT
public:
CheckUpdateTask(std::list<Mod>& mods, std::list<Version>& mcVersions, ModAPI::ModLoaderTypes loaders, std::shared_ptr<ModFolderModel> mods_folder)
CheckUpdateTask(std::list<Mod*>& mods, std::list<Version>& mcVersions, ModAPI::ModLoaderTypes loaders, std::shared_ptr<ModFolderModel> mods_folder)
: Task(nullptr), m_mods(mods), m_game_versions(mcVersions), m_loaders(loaders), m_mods_folder(mods_folder) {};
struct UpdatableMod {
@ -39,10 +39,10 @@ class CheckUpdateTask : public Task {
void executeTask() override = 0;
signals:
void checkFailed(Mod failed, QString reason, QUrl recover_url = {});
void checkFailed(Mod* failed, QString reason, QUrl recover_url = {});
protected:
std::list<Mod>& m_mods;
std::list<Mod*>& m_mods;
std::list<Version>& m_game_versions;
ModAPI::ModLoaderTypes m_loaders;
std::shared_ptr<ModFolderModel> m_mods_folder;