aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ModPage.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-06-03 00:44:53 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-06-03 00:44:53 +0300
commitd50bd096a49362346ff51669d0ab23261e7391b0 (patch)
tree9e84cac1dda89eda430ae251cfd32337d13d51d5 /launcher/ui/pages/modplatform/ModPage.h
parent17691ab5154ecadf661f1035cfc87b4e4c5e236f (diff)
parent1840505a0f887ebfc2c719113873ea3345b133fb (diff)
downloadPrismLauncher-d50bd096a49362346ff51669d0ab23261e7391b0.tar.gz
PrismLauncher-d50bd096a49362346ff51669d0ab23261e7391b0.tar.bz2
PrismLauncher-d50bd096a49362346ff51669d0ab23261e7391b0.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into logdir
Diffstat (limited to 'launcher/ui/pages/modplatform/ModPage.h')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index 4ea55efa..5510c191 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -8,8 +8,8 @@
#include "modplatform/ModIndex.h"
-#include "ui/pages/modplatform/ResourcePage.h"
#include "ui/pages/modplatform/ModModel.h"
+#include "ui/pages/modplatform/ResourcePage.h"
#include "ui/widgets/ModFilterWidget.h"
namespace Ui {
@@ -25,13 +25,14 @@ class ModPage : public ResourcePage {
Q_OBJECT
public:
- template<typename T>
+ template <typename T>
static T* create(ModDownloadDialog* dialog, BaseInstance& instance)
{
auto page = new T(dialog, instance);
auto model = static_cast<ModModel*>(page->getModel());
- auto filter_widget = ModFilterWidget::create(static_cast<MinecraftInstance&>(instance).getPackProfile()->getComponentVersion("net.minecraft"), page);
+ auto filter_widget =
+ ModFilterWidget::create(static_cast<MinecraftInstance&>(instance).getPackProfile()->getComponentVersion("net.minecraft"), page);
page->setFilterWidget(filter_widget);
model->setFilter(page->getFilter());
@@ -48,9 +49,13 @@ class ModPage : public ResourcePage {
[[nodiscard]] QMap<QString, QString> urlHandlers() const override;
- void addResourceToDialog(ModPlatform::IndexedPack&, ModPlatform::IndexedVersion&) override;
+ void addResourceToPage(ModPlatform::IndexedPack::Ptr,
+ ModPlatform::IndexedVersion&,
+ const std::shared_ptr<ResourceFolderModel>) override;
- virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders = {}) const -> bool = 0;
+ virtual auto validateVersion(ModPlatform::IndexedVersion& ver,
+ QString mineVer,
+ std::optional<ResourceAPI::ModLoaderTypes> loaders = {}) const -> bool = 0;
[[nodiscard]] bool supportsFiltering() const override { return true; };
auto getFilter() const -> const std::shared_ptr<ModFilterWidget::Filter> { return m_filter; }