diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-09 19:38:17 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-09 19:38:17 +0300 |
commit | d7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86 (patch) | |
tree | 9348d96110913ec2916e0854d5e495e33e1c9352 /launcher/minecraft/mod/Mod.cpp | |
parent | 908ac813e0f96126a643851e99379956faa08cda (diff) | |
parent | 67d473aab773e7f94c394ebdde05581dc8f805de (diff) | |
download | PrismLauncher-d7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86.tar.gz PrismLauncher-d7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86.tar.bz2 PrismLauncher-d7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curse
Diffstat (limited to 'launcher/minecraft/mod/Mod.cpp')
-rw-r--r-- | launcher/minecraft/mod/Mod.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Mod.cpp b/launcher/minecraft/mod/Mod.cpp index e613ddeb..fa1a0253 100644 --- a/launcher/minecraft/mod/Mod.cpp +++ b/launcher/minecraft/mod/Mod.cpp @@ -91,6 +91,7 @@ std::pair<int, bool> Mod::compare(const Resource& other, SortType type) const auto res = Resource::compare(other, type); if (res.first != 0) return res; + break; } case SortType::VERSION: { auto this_ver = Version(version()); @@ -99,11 +100,13 @@ std::pair<int, bool> Mod::compare(const Resource& other, SortType type) const return { 1, type == SortType::VERSION }; if (this_ver < other_ver) return { -1, type == SortType::VERSION }; + break; } case SortType::PROVIDER: { auto compare_result = QString::compare(provider().value_or("Unknown"), cast_other->provider().value_or("Unknown"), Qt::CaseInsensitive); if (compare_result != 0) return { compare_result, type == SortType::PROVIDER }; + break; } } return { 0, false }; @@ -166,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; |