aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/modplatform/flame')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModModel.cpp6
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModModel.h1
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h7
3 files changed, 13 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameModModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModModel.cpp
index 8de2e545..bc2c686c 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModModel.cpp
@@ -12,6 +12,12 @@ void ListModel::loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj)
FlameMod::loadIndexedPack(m, obj);
}
+// We already deal with the URLs when initializing the pack, due to the API response's structure
+void ListModel::loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj)
+{
+ FlameMod::loadBody(m, obj);
+}
+
void ListModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr)
{
FlameMod::loadIndexedPackVersions(m, arr, APPLICATION->network(), m_parent->m_instance);
diff --git a/launcher/ui/pages/modplatform/flame/FlameModModel.h b/launcher/ui/pages/modplatform/flame/FlameModModel.h
index 707c1bb1..6a6aef2e 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModModel.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModModel.h
@@ -13,6 +13,7 @@ class ListModel : public ModPlatform::ListModel {
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;
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.h b/launcher/ui/pages/modplatform/flame/FlameModPage.h
index 445d0368..2cd484cb 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.h
@@ -44,7 +44,12 @@ class FlameModPage : public ModPage {
Q_OBJECT
public:
- explicit FlameModPage(ModDownloadDialog* dialog, BaseInstance* instance);
+ static FlameModPage* create(ModDownloadDialog* dialog, BaseInstance* instance)
+ {
+ return ModPage::create<FlameModPage>(dialog, instance);
+ }
+
+ FlameModPage(ModDownloadDialog* dialog, BaseInstance* instance);
~FlameModPage() override = default;
inline auto displayName() const -> QString override { return "CurseForge"; }