aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-03-06 13:54:05 -0300
committerflow <thiagodonato300@gmail.com>2022-03-06 13:54:55 -0300
commit5e9d49a91082c53907db84df809d21c3bdc8bcac (patch)
treea9b2c3163eb94e64ff1e72652bb911106cb7c202 /launcher/ui/pages/modplatform/flame
parent9a8599e4ba7e1df616d0e4b4a4a899792ecaa3e1 (diff)
downloadPrismLauncher-5e9d49a91082c53907db84df809d21c3bdc8bcac.tar.gz
PrismLauncher-5e9d49a91082c53907db84df809d21c3bdc8bcac.tar.bz2
PrismLauncher-5e9d49a91082c53907db84df809d21c3bdc8bcac.zip
refactor: use only a single unique_ptr for the api
Diffstat (limited to 'launcher/ui/pages/modplatform/flame')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp2
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h4
2 files changed, 1 insertions, 5 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
index ef33f972..47a79bd6 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
@@ -13,7 +13,7 @@
#include "ui/dialogs/ModDownloadDialog.h"
FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance* instance)
- : ModPage(dialog, instance)
+ : ModPage(dialog, instance, new FlameAPI())
{
listModel = new FlameMod::ListModel(this);
ui->packView->setModel(listModel);
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.h b/launcher/ui/pages/modplatform/flame/FlameModPage.h
index e7d98cb0..89311e7f 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.h
@@ -20,11 +20,7 @@ class FlameModPage : public ModPage {
inline QString metaEntryBase() const override { return "FlameMods"; };
bool shouldDisplay() const override;
- const ModAPI* apiProvider() const override { return &api; };
private:
void onModVersionSucceed(ModPage*, QByteArray*, QString) override;
-
- private:
- FlameAPI api;
};