aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-16 19:03:52 -0300
committerflow <flowlnlnln@gmail.com>2023-01-13 16:23:06 -0300
commit433a802c6ed3070b1b2f4435937a456eb4192f78 (patch)
treeba939d277a46b0cc0cac8ad62dd9c0442eaf7c35 /launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
parent6a1807995390b2a2cbe074ee1f47d3791e0e3f10 (diff)
downloadPrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.tar.gz
PrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.tar.bz2
PrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.zip
refactor: put resource downloading classes in common namespace
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>
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h')
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
index bf62d22f..b0088a73 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
@@ -20,24 +20,22 @@
#include "ui/pages/modplatform/ModModel.h"
-#include "ui/pages/modplatform/modrinth/ModrinthResourcePages.h"
+namespace ResourceDownload {
-#include "modplatform/modrinth/ModrinthAPI.h"
+class ModrinthModPage;
-namespace Modrinth {
-
-class ListModel : public ModPlatform::ListModel {
+class ModrinthModModel : public ModModel {
Q_OBJECT
public:
- ListModel(ModrinthModPage* parent) : ModPlatform::ListModel(parent, new ModrinthAPI){};
- ~ListModel() override = default;
+ ModrinthModModel(ModrinthModPage* parent);
+ ~ModrinthModModel() override = default;
private:
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
void loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) override;
-
+
auto documentToArray(QJsonDocument& obj) const -> QJsonArray override;
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
@@ -45,5 +43,4 @@ class ListModel : public ModPlatform::ListModel {
inline auto getSorts() const -> const char** override { return sorts; };
};
-} // namespace Modrinth
-
+} // namespace ResourceDownload