diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-04 19:42:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 19:42:36 +0200 |
commit | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (patch) | |
tree | ed41f30e2c0f02e4be1d42324b3f05fbab75b2cd /launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp | |
parent | 50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff) | |
parent | 1d638e018ac40fbfb35dd117f9a948c0cf35eadd (diff) | |
download | PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.gz PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.bz2 PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.zip |
Merge pull request #1459 from Scrumplex/format
Diffstat (limited to 'launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp b/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp index f93e27e6..dc17e705 100644 --- a/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp +++ b/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp @@ -49,8 +49,7 @@ static bool isOptedOut(ModPlatform::IndexedVersion const& ver) return ver.downloadUrl.isEmpty(); } -FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance& instance) - : ModPage(dialog, instance) +FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance& instance) : ModPage(dialog, instance) { m_model = new FlameModModel(instance); m_ui->packView->setModel(m_model); @@ -67,7 +66,9 @@ FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance& instance) m_ui->packDescription->setMetaEntry(metaEntryBase()); } -auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders) const -> bool +auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, + QString mineVer, + std::optional<ResourceAPI::ModLoaderTypes> loaders) const -> bool { Q_UNUSED(loaders); return ver.mcVersion.contains(mineVer) && !ver.downloadUrl.isEmpty(); @@ -86,7 +87,7 @@ void FlameModPage::openUrl(const QUrl& url) if (query.startsWith("remoteUrl=")) { // attempt to resolve url from warning page query.remove(0, 10); - ModPage::openUrl({QUrl::fromPercentEncoding(query.toUtf8())}); // double decoding is necessary + ModPage::openUrl({ QUrl::fromPercentEncoding(query.toUtf8()) }); // double decoding is necessary return; } } @@ -125,7 +126,7 @@ void FlameResourcePackPage::openUrl(const QUrl& url) if (query.startsWith("remoteUrl=")) { // attempt to resolve url from warning page query.remove(0, 10); - ResourcePackResourcePage::openUrl({QUrl::fromPercentEncoding(query.toUtf8())}); // double decoding is necessary + ResourcePackResourcePage::openUrl({ QUrl::fromPercentEncoding(query.toUtf8()) }); // double decoding is necessary return; } } @@ -164,7 +165,7 @@ void FlameTexturePackPage::openUrl(const QUrl& url) if (query.startsWith("remoteUrl=")) { // attempt to resolve url from warning page query.remove(0, 10); - ResourcePackResourcePage::openUrl({QUrl::fromPercentEncoding(query.toUtf8())}); // double decoding is necessary + ResourcePackResourcePage::openUrl({ QUrl::fromPercentEncoding(query.toUtf8()) }); // double decoding is necessary return; } } @@ -175,8 +176,17 @@ void FlameTexturePackPage::openUrl(const QUrl& url) // I don't know why, but doing this on the parent class makes it so that // other mod providers start loading before being selected, at least with // my Qt, so we need to implement this in every derived class... -auto FlameModPage::shouldDisplay() const -> bool { return true; } -auto FlameResourcePackPage::shouldDisplay() const -> bool { return true; } -auto FlameTexturePackPage::shouldDisplay() const -> bool { return true; } +auto FlameModPage::shouldDisplay() const -> bool +{ + return true; +} +auto FlameResourcePackPage::shouldDisplay() const -> bool +{ + return true; +} +auto FlameTexturePackPage::shouldDisplay() const -> bool +{ + return true; +} } // namespace ResourceDownload |