diff options
author | Tayou <31988415+TayouVR@users.noreply.github.com> | 2023-07-07 22:23:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 22:23:59 +0200 |
commit | 1131038fdb0093ef9c732b18d699b6176fc6d82c (patch) | |
tree | eb930aa7d5a0f388095943ed45eb60c2d68f24d7 /launcher/minecraft | |
parent | d1528c10440f424117e487f4a6e692c3e3a4277e (diff) | |
parent | b8482a5d89b4044482e7b55aa1c2e2547b41f4fd (diff) | |
download | PrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.tar.gz PrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.tar.bz2 PrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.zip |
Merge pull request #1120 from Trial97/visit_mod_page
Diffstat (limited to 'launcher/minecraft')
-rw-r--r-- | launcher/minecraft/mod/Mod.cpp | 7 | ||||
-rw-r--r-- | launcher/minecraft/mod/Mod.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Mod.cpp b/launcher/minecraft/mod/Mod.cpp index f8af9d8f..fa1a0253 100644 --- a/launcher/minecraft/mod/Mod.cpp +++ b/launcher/minecraft/mod/Mod.cpp @@ -169,6 +169,13 @@ auto Mod::homeurl() const -> QString return details().homeurl; } +auto Mod::metaurl() const -> QString +{ + if (metadata() == nullptr) + return homeurl(); + return ModPlatform::getMetaURL(metadata()->provider, metadata()->project_id); +} + auto Mod::description() const -> QString { return details().description; diff --git a/launcher/minecraft/mod/Mod.h b/launcher/minecraft/mod/Mod.h index d4e419f4..d6272f4d 100644 --- a/launcher/minecraft/mod/Mod.h +++ b/launcher/minecraft/mod/Mod.h @@ -70,6 +70,7 @@ public: auto provider() const -> std::optional<QString>; auto licenses() const -> const QList<ModLicense>&; auto issueTracker() const -> QString; + auto metaurl() const -> QString; /** Get the intneral path to the mod's icon file*/ QString iconPath() const { return m_local_details.icon_file; }; |