aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp
AgeCommit message (Collapse)Author
2022-09-16fix: prevent deletes by shared pointer accidental creationflow
This fixes the launcher crashing when opening the game :iea: Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16fix: move newly allocated resources to the main threadflow
This avoids them getting deleted when the worker thread exits, due to thread affinity on the created thread. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-16fix: memory leak when getting mods from the mods folderflow
friendly reminder to always delete your news. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03fix: race condition on ResourceFolderModel testsflow
This (hopefully) fixes the race contiditions that sometimes got triggered in tests. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: simplify Mod structureflow
No need to keep track of pointers left and right. A single one already gives enough headaches! Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20fix: don't give shared pointer to obj. external to the modelflow
It causes some weird problems and adds refcounting overhead. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move general code from mod model to its own modelflow
This aims to continue decoupling other types of resources (e.g. resource packs, shader packs, etc) from mods, so that we don't have to continuously watch our backs for changes to one of them affecting the others. To do so, this creates a more general list model for resources, based on the mods one, that allows you to extend it with functionality for other resources. I had to do some template and preprocessor stuff to get around the QObject limitation of not allowing templated classes, so that's sadge :c On the other hand, I tried cleaning up most general-purpose code in the mod model, and added some documentation, because it looks nice :D Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-11fix: only remove orphaned metadata on first openingflow
This avoids deleting the metadata while one is updating their mods. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-02fix: remove orphaned metadata to avoid problems with auto-updating instsflow
Just as my master has taught me. :gun: Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17fix: raw-pointers and leaks in ModFolderLoadTaskflow
Co-authored-by: timoreo <contact@timoreo.fr> Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: make Mod a QObject used as a pointerflow
Prevents problems when copying it around! Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: mod metadata improvementsflow
- Use slug instead of name - Keep temporary status before having local details Signed-off-by: flow <flowlnlnln@gmail.com>
2022-06-13Merge pull request #714 from Scrumplex/fix-testsSefa Eyeoglu
Fix mod metadata tests
2022-06-12fix: segfault when the same mod is present enabled and disabled at onceflow
This maintains the previous behaviour
2022-06-12fix: correctly handle disabled mods with metadataflow
im stupid
2022-06-12chore: add license headersSefa Eyeoglu
2022-06-12refactor(test): fix loading mod metadata settingSefa Eyeoglu
2022-05-23chore: add license headersflow
Prevents a massive inload of Scrumplex ditto's :) I didn't add it to every file modified in this PR because the other changes are pretty minor, and would explode the diff of the PR. I hope that's not a problem O_O
2022-05-23fix: implement PR suggestionsflow
Some stylistic changes, and get hashes from the mod providers when building the metadata.
2022-05-23refactor: make mod metadata presence (or lack of) easier to find outflow
2022-05-23test+fix: add basic tests and fix issues with itflow
2022-05-23feat: allow disabling mod metadata usageflow
2022-05-23refactor: abstract metadata handling and clarify namesflow
2022-05-23refactor: remove unused mod info and organize some stuffflow
2022-05-23refactor: move mod tasks to their own subfolderflow
Makes the launcher/minecraft/mod/ folder a little more organized.