From 9c57b54a81a9026aa86a983a203df17c023eaa8d Mon Sep 17 00:00:00 2001 From: flow Date: Mon, 7 Mar 2022 19:29:59 -0300 Subject: refactor: move things around so that related things are close together This also adds some comments around ModModel.cpp and ModPage.cpp to add some ease of reading the code. Also move some things from headers to cpp files. --- launcher/ui/pages/modplatform/ModPage.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'launcher/ui/pages/modplatform/ModPage.h') diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h index aa0e8894..de66b3b0 100644 --- a/launcher/ui/pages/modplatform/ModPage.h +++ b/launcher/ui/pages/modplatform/ModPage.h @@ -35,9 +35,12 @@ class ModPage : public QWidget, public BasePage { virtual bool shouldDisplay() const override = 0; + virtual bool validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const = 0; + const ModAPI* apiProvider() const { return api.get(); }; - virtual void onRequestVersionsSucceeded(QJsonDocument&, QString) = 0; + ModPlatform::IndexedPack& getCurrent() { return current; } + void updateModVersions(); void openedImpl() override; bool eventFilter(QObject* watched, QEvent* event) override; @@ -45,7 +48,6 @@ class ModPage : public QWidget, public BasePage { BaseInstance* m_instance; protected: - void updateSelectionButton(); protected slots: -- cgit