aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-08-21 10:50:10 -0300
committerflow <flowlnlnln@gmail.com>2022-09-07 08:29:58 -0300
commit42eb265624cb4a6461dc203a5ebfcb35ddd5d730 (patch)
tree67dbb06ad3c8c8759ba631dabe5eee20b55fc86a /launcher/ui/pages/modplatform/flame
parent8a65726e9dbe990a898a49d4ce05d61ad5b06852 (diff)
downloadPrismLauncher-42eb265624cb4a6461dc203a5ebfcb35ddd5d730.tar.gz
PrismLauncher-42eb265624cb4a6461dc203a5ebfcb35ddd5d730.tar.bz2
PrismLauncher-42eb265624cb4a6461dc203a5ebfcb35ddd5d730.zip
refactor: create mod pages and filter widget by factory methods
This takes most expensive operations out of the constructors. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/flame')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h7
1 files changed, 6 insertions, 1 deletions
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"; }