diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 547f784e6..3f966a2c4 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -108,7 +108,6 @@ #include "icons/IconList.h" #include "net/HttpMetaCache.h" - #include "updater/ExternalUpdater.h" #include "tools/JProfiler.h" diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h index 0dea3c7f1..391c5c0c0 100644 --- a/launcher/minecraft/mod/ResourceFolderModel.h +++ b/launcher/minecraft/mod/ResourceFolderModel.h @@ -21,11 +21,11 @@ class QSortFilterProxyModel; /* A macro to define useful functions to handle Resource* -> T* more easily on derived classes */ #define RESOURCE_HELPERS(T) \ - T& at(int index) \ + T& at(int index) \ { \ return *static_cast(m_resources[index].get()); \ } \ - const T& at(int index) const \ + const T& at(int index) const \ { \ return *static_cast(m_resources.at(index).get()); \ } \ diff --git a/launcher/modplatform/ModIndex.cpp b/launcher/modplatform/ModIndex.cpp index b13087158..5e8759f97 100644 --- a/launcher/modplatform/ModIndex.cpp +++ b/launcher/modplatform/ModIndex.cpp @@ -31,7 +31,8 @@ static const QMap s_indexed_version_ty { "alpha", IndexedVersionType::VersionType::Alpha } }; -static const QList loaderList = { NeoForge, Forge, Cauldron, LiteLoader, Quilt, Fabric, Babric, BTA, LegacyFabric, Ornithe, Rift }; +static const QList loaderList = { NeoForge, Forge, Cauldron, LiteLoader, Quilt, Fabric, + Babric, BTA, LegacyFabric, Ornithe, Rift }; QList modLoaderTypesToList(ModLoaderTypes flags) { diff --git a/launcher/modplatform/ResourceType.h b/launcher/modplatform/ResourceType.h index b9073aa17..7f3e3042c 100644 --- a/launcher/modplatform/ResourceType.h +++ b/launcher/modplatform/ResourceType.h @@ -33,7 +33,7 @@ enum class ResourceType { Mod, ResourcePack, ShaderPack, Modpack, DataPack, Worl namespace ResourceTypeUtils { static const std::set VALID_RESOURCES = { ResourceType::DataPack, ResourceType::ResourcePack, ResourceType::TexturePack, - ResourceType::ShaderPack, ResourceType::World, ResourceType::Mod }; + ResourceType::ShaderPack, ResourceType::World, ResourceType::Mod }; QString getName(ResourceType type); } // namespace ResourceTypeUtils } // namespace ModPlatform \ No newline at end of file diff --git a/launcher/modplatform/flame/FlameAPI.h b/launcher/modplatform/flame/FlameAPI.h index 799e142ce..abbbc2fbc 100644 --- a/launcher/modplatform/flame/FlameAPI.h +++ b/launcher/modplatform/flame/FlameAPI.h @@ -160,10 +160,7 @@ class FlameAPI : public ResourceAPI { void loadExtraPackInfo(ModPlatform::IndexedPack& m, [[maybe_unused]] QJsonObject&) const override { FlameMod::loadBody(m); } private: - std::optional getInfoURL(QString const& id) const override - { - return QString(BuildConfig.FLAME_BASE_URL + "/mods/%1").arg(id); - } + std::optional getInfoURL(QString const& id) const override { return QString(BuildConfig.FLAME_BASE_URL + "/mods/%1").arg(id); } std::optional getDependencyURL(DependencySearchArgs const& args) const override { auto addonId = args.dependency.addonId.toString(); diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h index c2714b3c8..077a522ae 100644 --- a/launcher/modplatform/modrinth/ModrinthAPI.h +++ b/launcher/modplatform/modrinth/ModrinthAPI.h @@ -45,7 +45,8 @@ class ModrinthAPI : public ResourceAPI { { QStringList l; for (auto loader : { ModPlatform::NeoForge, ModPlatform::Forge, ModPlatform::Fabric, ModPlatform::Quilt, ModPlatform::LiteLoader, - ModPlatform::DataPack, ModPlatform::Babric, ModPlatform::BTA, ModPlatform::LegacyFabric, ModPlatform::Ornithe, ModPlatform::Rift }) { + ModPlatform::DataPack, ModPlatform::Babric, ModPlatform::BTA, ModPlatform::LegacyFabric, ModPlatform::Ornithe, + ModPlatform::Rift }) { if (types & loader) { l << getModLoaderAsString(loader); } @@ -204,7 +205,8 @@ class ModrinthAPI : public ResourceAPI { static inline auto validateModLoaders(ModPlatform::ModLoaderTypes loaders) -> bool { return loaders & (ModPlatform::NeoForge | ModPlatform::Forge | ModPlatform::Fabric | ModPlatform::Quilt | ModPlatform::LiteLoader | - ModPlatform::DataPack | ModPlatform::Babric | ModPlatform::BTA | ModPlatform::LegacyFabric | ModPlatform::Ornithe | ModPlatform::Rift); + ModPlatform::DataPack | ModPlatform::Babric | ModPlatform::BTA | ModPlatform::LegacyFabric | + ModPlatform::Ornithe | ModPlatform::Rift); } std::optional getDependencyURL(DependencySearchArgs const& args) const override diff --git a/launcher/ui/setupwizard/ThemeWizardPage.h b/launcher/ui/setupwizard/ThemeWizardPage.h index 8ea438398..ef4613e41 100644 --- a/launcher/ui/setupwizard/ThemeWizardPage.h +++ b/launcher/ui/setupwizard/ThemeWizardPage.h @@ -42,5 +42,5 @@ class ThemeWizardPage : public BaseWizardPage { void retranslate() override { widget.retranslateUi(); } private: - AppearanceWidget widget{true}; + AppearanceWidget widget{ true }; }; diff --git a/launcher/ui/themes/ThemeManager.cpp b/launcher/ui/themes/ThemeManager.cpp index a7076da5a..6e22c5b76 100644 --- a/launcher/ui/themes/ThemeManager.cpp +++ b/launcher/ui/themes/ThemeManager.cpp @@ -180,12 +180,9 @@ void ThemeManager::initializeWidgets() } #ifndef Q_OS_MACOS -void ThemeManager::setTitlebarColorOnMac(WId windowId, QColor color) -{} -void ThemeManager::setTitlebarColorOfAllWindowsOnMac(QColor color) -{} -void ThemeManager::stopSettingNewWindowColorsOnMac() -{} +void ThemeManager::setTitlebarColorOnMac(WId windowId, QColor color) {} +void ThemeManager::setTitlebarColorOfAllWindowsOnMac(QColor color) {} +void ThemeManager::stopSettingNewWindowColorsOnMac() {} #endif QList ThemeManager::getValidIconThemes() diff --git a/launcher/ui/themes/ThemeManager.h b/launcher/ui/themes/ThemeManager.h index 8baa88627..fe0fea926 100644 --- a/launcher/ui/themes/ThemeManager.h +++ b/launcher/ui/themes/ThemeManager.h @@ -27,12 +27,10 @@ #include "ui/themes/CatPack.h" #include "ui/themes/ITheme.h" -inline auto themeDebugLog() -{ +inline auto themeDebugLog() { return qDebug() << "[Theme]"; } -inline auto themeWarningLog() -{ +inline auto themeWarningLog() { return qWarning() << "[Theme]"; } @@ -65,9 +63,9 @@ class ThemeManager { private: std::map> m_themes; std::map m_icons; - QDir m_iconThemeFolder{ "iconthemes" }; - QDir m_applicationThemeFolder{ "themes" }; - QDir m_catPacksFolder{ "catpacks" }; + QDir m_iconThemeFolder{"iconthemes"}; + QDir m_applicationThemeFolder{"themes"}; + QDir m_catPacksFolder{"catpacks"}; std::map> m_catPacks; QPalette m_defaultPalette; QString m_defaultStyle; @@ -93,6 +91,6 @@ class ThemeManager { NSObject* m_windowTitlebarObserver = nullptr; #endif - const QStringList builtinIcons{ "pe_colored", "pe_light", "pe_dark", "pe_blue", "breeze_light", "breeze_dark", - "OSX", "iOS", "flat", "flat_white", "multimc" }; + const QStringList builtinIcons{"pe_colored", "pe_light", "pe_dark", "pe_blue", "breeze_light", "breeze_dark", + "OSX", "iOS", "flat", "flat_white", "multimc"}; }; diff --git a/launcher/ui/widgets/InfoFrame.cpp b/launcher/ui/widgets/InfoFrame.cpp index 2363b6592..1e641c4f9 100644 --- a/launcher/ui/widgets/InfoFrame.cpp +++ b/launcher/ui/widgets/InfoFrame.cpp @@ -227,7 +227,8 @@ void InfoFrame::updateWithResourcePack(ResourcePack& resource_pack) setImage(resource_pack.image({ 64, 64 })); } -void InfoFrame::updateWithDataPack(DataPack& data_pack) { +void InfoFrame::updateWithDataPack(DataPack& data_pack) +{ setName(renderColorCodes(data_pack.name())); setDescription(renderColorCodes(data_pack.description())); setImage(data_pack.image({ 64, 64 })); diff --git a/launcher/ui/widgets/JavaSettingsWidget.cpp b/launcher/ui/widgets/JavaSettingsWidget.cpp index 0a0d1968b..01da7cc48 100644 --- a/launcher/ui/widgets/JavaSettingsWidget.cpp +++ b/launcher/ui/widgets/JavaSettingsWidget.cpp @@ -292,7 +292,8 @@ void JavaSettingsWidget::updateThresholds() const QString warningColour(QStringLiteral("%1")); if (maxMem >= sysMiB) { - m_ui->labelMaxMemNotice->setText(QString("%1").arg(tr("Your maximum memory allocation exceeds your system memory capacity."))); + m_ui->labelMaxMemNotice->setText( + QString("%1").arg(tr("Your maximum memory allocation exceeds your system memory capacity."))); m_ui->labelMaxMemNotice->show(); } else if (maxMem > (sysMiB * 0.9)) { m_ui->labelMaxMemNotice->setText(warningColour.arg(tr("Your maximum memory allocation is close to your system memory capacity.")));