aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod
AgeCommit message (Collapse)Author
2022-11-14Pass index.parent() as parent parameter for rowCountTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14Use Q_UNUSED instead of [[maybe_unused]] in onParseFailedTheLastRar
Qt5 on Ubuntu cannot handle [[maybe_unused]] in this function Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14Check parent in rowCount/columnCount/canFetchMoreTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14Mark paramaters of onParseFailed as unusedTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-13fix: Fix the error that CodeQL caughttxtsd
Signed-off-by: txtsd <code@ihavea.quest>
2022-11-04fix: use unicode variant for marking '.index' hiddenflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-25Update launcher/minecraft/mod/tasks/LocalModParseTask.cppAlexandru Ionut Tripon
Co-authored-by: flow <flowlnlnln@gmail.com> Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
2022-09-24Replaced tomlc99 with tomlplusplusTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2022-09-20fix: ensure all resource folders existSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20fix: comments and naming of texture pack stuffSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20fix: testsSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20feat: add texture pack parsingSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-16fix: prevent container detaching in ResourceFolderModelflow
and use const accessors whenever we can! Signed-off-by: flow <flowlnlnln@gmail.com>
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-11refactor: restructure testsSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-03fix: improve handling of unrecognized pack formatsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03fix: crash when adding resource packs directly in the folderflow
This fixes an issue in which, when adding a new resource pack externally to PolyMC, when the resource pack view was open, would crash poly. 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-09-03feat: move resource pack images to QPixmapCacheflow
This takes care of evicting entries when the cache gets too big for us, so we can add new entries without much worries. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03feat(tests): add tests for resource pack parsingflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03refactor: move resource pack file parsing utilities to separate namespaceflow
This makes it easier to use that logic in other contexts. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03feat: add image from pack.png to resource packsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03fix: filtering in regex search in resource packsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03fix: sorting by pack formatflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03feat: add basic resource pack parsing of pack.mcmetaflow
This parses the pack format ID and the description from the local file, from both a ZIP and a folder, and hooks it into the model. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03feat: add more resource pack infoflow
Adds pack format id and description to ResourcePack, that'll be parsed from pack.mcmeta. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03feat: allow specifying factory for resources in BasicFolderLoadTaskflow
This allows us to hook our own resource type, that possibly has more content than the base Resource, to it. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20fix: LGTM warningsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20change: add enable/disable to resourcesflow
TIL that zip resource packs, when disabled, actually have the effect of not showing up in the game at all. Since this can be useful to someone, I moved the logic for it to the resources. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor+fix: add new tests for Resource models and fix issuesflow
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(tests): add timeout on ModFolderModel's testsflow
If the update never ends, the signal is not emitted and we become stuck in the event loop forever. So a very lenient timer is added to prevent that. 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: adapt rest of the codebase to the new resource modelflow
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>
2022-08-20refactor: make Resource Pack model inherit from ResourceFolderModelflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move more tied logic to model and move logic to the resourcesflow
This moves the QSortFilterProxyModel to the resource model files, acessible via a factory method, and moves the sorting and filtering to the objects themselves, decoupling the code a bit. This also adds a basic implementation of methods in the ResourceFolderModel, simplifying the process of constructing a new model from it. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move things around in the mod modelflow
Makes the method order in the cpp file the same as in the header file. 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-20refactor: move general info from Mod to Resourceflow
This allows us to create other resources that are not Mods, but can still share a significant portion of code. 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-17fix: std::list -> QListflow
Qt6 removed Qlist::toStdList() :sob: Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: use ModStatus as a simple member instead of a pointerflow
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-07-17fix: mod parsing of 'String-fied' version (i.e. OpenBlocks)flow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17feat: add metadata get/delete via mod idflow
This is, in many cases, more reliable than name comparisons, so it's useful specially in cases where a mod changes name between versions Signed-off-by: flow <flowlnlnln@gmail.com>