aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourceFolderModel.h
AgeCommit message (Collapse)Author
2023-08-15Some warningsTrial97
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-08-14chore: reformatSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-11fix: fix more warningsSefa 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-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-07-01Merge branch 'develop' into chore/add-compiler-warningsRachel Powers
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-06-04chore: clean up after new compiler warningsRachel 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-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-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-15fix(ResourceModel): use a single ConcurrentTask for parsing tasksflow
This avoids creating a bunch of threads that fills up the maximum amount allowed by QThreadPool, and causes a deadlock between the helper threads and the main thread (main thread tries to create threads in painting code, but isn't able to, so it keeps waiting for a thread to free up, but all the threads are waiting on the main thread to process some events). Signed-off-by: flow <flowlnlnln@gmail.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-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-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: 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-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 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>