deduplicate includes and reformat (#4228)
This commit is contained in:
@@ -108,8 +108,6 @@
|
||||
#include "icons/IconList.h"
|
||||
#include "net/HttpMetaCache.h"
|
||||
|
||||
#include "java/JavaInstallList.h"
|
||||
|
||||
#include "updater/ExternalUpdater.h"
|
||||
|
||||
#include "tools/JProfiler.h"
|
||||
@@ -128,7 +126,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys.h>
|
||||
#include <QStringLiteral>
|
||||
#include "SysInfo.h"
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
|
||||
@@ -59,10 +59,8 @@
|
||||
#if defined Q_OS_WIN32
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <objbase.h>
|
||||
#include <objidl.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlobj.h>
|
||||
#include <shobjidl.h>
|
||||
#include <sys/utime.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QVariantMap>
|
||||
|
||||
enum class Validity { None, Assumed, Certain };
|
||||
|
||||
@@ -31,7 +31,8 @@ static const QMap<QString, IndexedVersionType::VersionType> s_indexed_version_ty
|
||||
{ "alpha", IndexedVersionType::VersionType::Alpha }
|
||||
};
|
||||
|
||||
static const QList<ModLoaderType> loaderList = { NeoForge, Forge, Cauldron, LiteLoader, Quilt, Fabric, Babric, BTA, LegacyFabric, Ornithe, Rift };
|
||||
static const QList<ModLoaderType> loaderList = { NeoForge, Forge, Cauldron, LiteLoader, Quilt, Fabric,
|
||||
Babric, BTA, LegacyFabric, Ornithe, Rift };
|
||||
|
||||
QList<ModLoaderType> modLoaderTypesToList(ModLoaderTypes flags)
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "meta/VersionList.h"
|
||||
#include "net/NetJob.h"
|
||||
|
||||
#include "net/NetJob.h"
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace LegacyFTB {
|
||||
|
||||
@@ -42,5 +42,5 @@ class ThemeWizardPage : public BaseWizardPage {
|
||||
void retranslate() override { widget.retranslateUi(); }
|
||||
|
||||
private:
|
||||
AppearanceWidget widget{true};
|
||||
AppearanceWidget widget{ true };
|
||||
};
|
||||
|
||||
@@ -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<IconTheme*> ThemeManager::getValidIconThemes()
|
||||
|
||||
@@ -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<QString, std::unique_ptr<ITheme>> m_themes;
|
||||
std::map<QString, IconTheme> 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<QString, std::unique_ptr<CatPack>> 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"};
|
||||
};
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
@@ -292,7 +292,8 @@ void JavaSettingsWidget::updateThresholds()
|
||||
const QString warningColour(QStringLiteral("<span style='color:#f5c211'>%1</span>"));
|
||||
|
||||
if (maxMem >= sysMiB) {
|
||||
m_ui->labelMaxMemNotice->setText(QString("<span style='color:red'>%1</span>").arg(tr("Your maximum memory allocation exceeds your system memory capacity.")));
|
||||
m_ui->labelMaxMemNotice->setText(
|
||||
QString("<span style='color:red'>%1</span>").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.")));
|
||||
|
||||
Reference in New Issue
Block a user