aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ModFolderModel.cpp
AgeCommit message (Collapse)Author
2023-09-04Merge pull request #1530 from Trial97/metadata_deleteSefa Eyeoglu
2023-08-17feat:added flame install mod metadataTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-08-16made safe for vegetariansTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-08-16feat:Added remove metadata buttonTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-08-14chore: update license headersSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-14chore: reformatSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-10Merge remote-tracking branch 'upstream/staging' into chore/add-compiler-warningsSefa Eyeoglu
2023-08-10Merge pull request #1324 from leia-uwu/ui-tweaksSefa Eyeoglu
2023-07-13Merge branch 'develop' into chore/add-compiler-warningsRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-07-10Merge pull request #1331 from TheKodeToad/hungry-trashseth
Fix updating trashing resources
2023-07-08Make trash hungryTheKodeToad
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-07-07disable hiding enable and name columns on folder modelsleo78913
Signed-off-by: leo78913 <leo3758@riseup.net>
2023-07-01chore: fix shadowed member and signed/unsigned mismatchRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: supress unused with [[maybe_unused]] Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: unshadow ^&^& static_cast implicit return Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused in parse task Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused in folder models Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused with instances Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: more deshadow and unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: remove uneeded simicolons Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: prevent shadow Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-06-28Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher ↵Trial97
into settings
2023-06-21Made buttons on ModsFolderPage enabled all the timeTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-21fix: resize columns on hide ^& uniform heightsRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-28fix: use instance settings, make image column user resizeable, fix memory leakRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-28refactor: column names as class property, use string names in settingRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-28Merge branch 'develop' into feature/images-for-resource-pageRachel Powers
2023-05-28fix(memory leak): don't give shared pointers out to foldermodels (causes ↵Rachel Powers
cyclic refrence) Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-24feat: Column on left, hideableRachel Powers
- columns are hideable (saves to settings) - image column moved to left - datamodals can provide resize modes Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-05feat: display license and issue trackerRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-05use 32x32 images for image columnRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-04feat(modpage): mod icon in description and columnRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-04-29refactor: pass instance ptr to resource models. use it to find instance root.Rachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-03-20cleanup: code review sugestionsRachel Powers
clean up translation strings Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-03-20fix: typosRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-03-20feat: warnings when instance resources are linkedRachel Powers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-02-22review fixeskumquat-ir
Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
2023-02-13do not create nilmods folderkumquat-ir
"it cant be that easy" - me, clueless Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
2022-12-29refactor(Mods): make provider() return a std::optionalflow
This makes it easier to check if a mod has a provider or not, without having to do a string comparison. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-15feat: add a provider column to the mods pageleo78913
Signed-off-by: leo78913 <leo3758@riseup.net>
2022-11-14Check parent in rowCount/columnCount/canFetchMoreTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-09-20fix: ensure all resource folders existSefa 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-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: 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-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: 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: 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-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-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: 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>