aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame/FlameResourcePages.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-16 19:03:52 -0300
committerflow <flowlnlnln@gmail.com>2023-01-13 16:23:06 -0300
commit433a802c6ed3070b1b2f4435937a456eb4192f78 (patch)
treeba939d277a46b0cc0cac8ad62dd9c0442eaf7c35 /launcher/ui/pages/modplatform/flame/FlameResourcePages.h
parent6a1807995390b2a2cbe074ee1f47d3791e0e3f10 (diff)
downloadPrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.tar.gz
PrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.tar.bz2
PrismLauncher-433a802c6ed3070b1b2f4435937a456eb4192f78.zip
refactor: put resource downloading classes in common namespace
Puts them all inside the 'ResourceDownload' namespace, so that it's a bit clearer from the outside that those belong to the same 'module'. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/flame/FlameResourcePages.h')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameResourcePages.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameResourcePages.h b/launcher/ui/pages/modplatform/flame/FlameResourcePages.h
index 597a0c25..6c7d0247 100644
--- a/launcher/ui/pages/modplatform/flame/FlameResourcePages.h
+++ b/launcher/ui/pages/modplatform/flame/FlameResourcePages.h
@@ -42,6 +42,16 @@
#include "ui/pages/modplatform/ModPage.h"
+namespace ResourceDownload {
+
+namespace Flame {
+static inline QString displayName() { return "CurseForge"; }
+static inline QIcon icon() { return APPLICATION->getThemedIcon("flame"); }
+static inline QString id() { return "curseforge"; }
+static inline QString debugName() { return "Flame"; }
+static inline QString metaEntryBase() { return "FlameMods"; };
+}
+
class FlameModPage : public ModPage {
Q_OBJECT
@@ -54,18 +64,20 @@ class FlameModPage : public ModPage {
FlameModPage(ModDownloadDialog* dialog, BaseInstance& instance);
~FlameModPage() override = default;
- inline auto displayName() const -> QString override { return "CurseForge"; }
- inline auto icon() const -> QIcon override { return APPLICATION->getThemedIcon("flame"); }
- inline auto id() const -> QString override { return "curseforge"; }
- inline auto helpPage() const -> QString override { return "Mod-platform"; }
+ [[nodiscard]] bool shouldDisplay() const override;
- inline auto debugName() const -> QString override { return "Flame"; }
- inline auto metaEntryBase() const -> QString override { return "FlameMods"; };
+ [[nodiscard]] inline auto displayName() const -> QString override { return Flame::displayName(); }
+ [[nodiscard]] inline auto icon() const -> QIcon override { return Flame::icon(); }
+ [[nodiscard]] inline auto id() const -> QString override { return Flame::id(); }
+ [[nodiscard]] inline auto debugName() const -> QString override { return Flame::debugName(); }
+ [[nodiscard]] inline auto metaEntryBase() const -> QString override { return Flame::metaEntryBase(); }
- auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders = {}) const -> bool override;
- bool optedOut(ModPlatform::IndexedVersion& ver) const override;
+ [[nodiscard]] inline auto helpPage() const -> QString override { return "Mod-platform"; }
- auto shouldDisplay() const -> bool override;
+ bool validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders = {}) const override;
+ bool optedOut(ModPlatform::IndexedVersion& ver) const override;
void openUrl(const QUrl& url) override;
};
+
+} // namespace ResourceDownload