aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ResourceDownloadDialog.cpp
AgeCommit message (Collapse)Author
2023-01-25refactor: make shared_qobject_ptr ctor explicitflow
This turns issues like creating two shared ptrs from a single raw ptr from popping up at runtime, instead making them a compile error. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): allow setting custom folder target for downloaded resourcesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): set resource strings for ReviewMessageBox tooflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): correctly set the strings for the specific resource namesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): decouple ResourceModels from ResourcePagesflow
This makes it so that we don't need a reference to the parent page in the model. It will be useful once we change the page from a widget-based one to a QML page. It also makes tasks be created in the dialog instead of the page, so that the dialog can also have the necessary information to mark versions as selected / deselected easily. It also makes the task pointers into smart pointers. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): unify download dialogs into a single fileflow
No need for multiple files since the subclasses are so small now Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor: put resource downloading classes in common namespaceflow
Puts them all inside the 'ResourceDownload' namespace, so that it's a bit clearer from the outside that those belong to the same 'module'. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor: generalize mod models and APIs to resourcesflow
Firstly, this abstract away behavior in the mod download models that can also be applied to other types of resources into a superclass, allowing other resource types to be implemented without so much code duplication. For that, this also generalizes the APIs used (currently, ModrinthAPI and FlameAPI) to be able to make requests to other types of resources. It also does a general cleanup of both of those. In particular, this makes use of std::optional instead of invalid values for errors and, well, optional values :p This is a squash of some commits that were becoming too interlaced together to be cleanly separated. Signed-off-by: flow <flowlnlnln@gmail.com>