diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
commit | 1d468ac35ad88d8c77cc83f25e3704d9bd7df01b (patch) | |
tree | 8644b1574c947a1a87c5c7b2567f746cfe17882f /launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp | |
parent | ce2ca1381519a2e261d7f76dffa874d559d979c2 (diff) | |
download | PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.gz PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.bz2 PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.zip |
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp index dd143700..ff809c7b 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp @@ -46,8 +46,7 @@ namespace ResourceDownload { -ModrinthModPage::ModrinthModPage(ModDownloadDialog* dialog, BaseInstance& instance) - : ModPage(dialog, instance) +ModrinthModPage::ModrinthModPage(ModDownloadDialog* dialog, BaseInstance& instance) : ModPage(dialog, instance) { m_model = new ModrinthModModel(instance); m_ui->packView->setModel(m_model); @@ -64,14 +63,15 @@ ModrinthModPage::ModrinthModPage(ModDownloadDialog* dialog, BaseInstance& instan m_ui->packDescription->setMetaEntry(metaEntryBase()); } -auto ModrinthModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ResourceAPI::ModLoaderTypes> loaders) const -> bool +auto ModrinthModPage::validateVersion(ModPlatform::IndexedVersion& ver, + QString mineVer, + std::optional<ResourceAPI::ModLoaderTypes> loaders) const -> bool { auto loaderCompatible = !loaders.has_value(); if (!loaderCompatible) { auto loaderStrings = ModrinthAPI::getModLoaderStrings(loaders.value()); - for (auto remoteLoader : ver.loaders) - { + for (auto remoteLoader : ver.loaders) { if (loaderStrings.contains(remoteLoader)) { loaderCompatible = true; break; @@ -139,9 +139,21 @@ ModrinthShaderPackPage::ModrinthShaderPackPage(ShaderPackDownloadDialog* dialog, // 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 ModrinthModPage::shouldDisplay() const -> bool { return true; } -auto ModrinthResourcePackPage::shouldDisplay() const -> bool { return true; } -auto ModrinthTexturePackPage::shouldDisplay() const -> bool { return true; } -auto ModrinthShaderPackPage::shouldDisplay() const -> bool { return true; } +auto ModrinthModPage::shouldDisplay() const -> bool +{ + return true; +} +auto ModrinthResourcePackPage::shouldDisplay() const -> bool +{ + return true; +} +auto ModrinthTexturePackPage::shouldDisplay() const -> bool +{ + return true; +} +auto ModrinthShaderPackPage::shouldDisplay() const -> bool +{ + return true; +} } // namespace ResourceDownload |