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>
This commit is contained in:
@ -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;
|
||||
[[nodiscard]] inline auto helpPage() const -> QString override { return "Mod-platform"; }
|
||||
|
||||
bool validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders = {}) const override;
|
||||
bool optedOut(ModPlatform::IndexedVersion& ver) const override;
|
||||
|
||||
auto shouldDisplay() const -> bool override;
|
||||
|
||||
void openUrl(const QUrl& url) override;
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
Reference in New Issue
Block a user