diff options
author | flow <flowlnlnln@gmail.com> | 2022-12-16 19:03:52 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2023-01-13 16:23:06 -0300 |
commit | 433a802c6ed3070b1b2f4435937a456eb4192f78 (patch) | |
tree | ba939d277a46b0cc0cac8ad62dd9c0442eaf7c35 /launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h | |
parent | 6a1807995390b2a2cbe074ee1f47d3791e0e3f10 (diff) | |
download | PrismLauncher-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.h | 17 |
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 |