Application.h cleanup (#4502)

This commit is contained in:
Alexandru Ionut Tripon 2026-02-11 15:44:19 +00:00 committed by GitHub
commit 157ae6fb72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 46 additions and 12 deletions

View file

@ -37,6 +37,8 @@
#pragma once
#include <memory>
#include <QApplication>
#include <QDateTime>
#include <QDebug>
@ -44,12 +46,10 @@
#include <QIcon>
#include <QMutex>
#include <QUrl>
#include <memory>
#include <BaseInstance.h>
#include "QObjectPtr.h"
#include "launch/LogModel.h"
#include "minecraft/launch/MinecraftTarget.h"
#include "minecraft/auth/MinecraftAccount.h"
class LaunchController;
class LocalPeer;
@ -74,6 +74,12 @@ class ITheme;
class MCEditTool;
class ThemeManager;
class IconTheme;
class BaseInstance;
class LogModel;
struct MinecraftTarget;
class MinecraftAccount;
namespace Meta {
class Index;
@ -212,8 +218,8 @@ class Application : public QApplication {
bool launch(BaseInstance* instance,
bool online = true,
bool demo = false,
MinecraftTarget::Ptr targetToJoin = nullptr,
MinecraftAccountPtr accountToUse = nullptr,
std::shared_ptr<MinecraftTarget> targetToJoin = nullptr,
shared_qobject_ptr<MinecraftAccount> accountToUse = nullptr,
const QString& offlineName = QString());
bool kill(BaseInstance* instance);
void closeCurrentWindow();

View file

@ -3,6 +3,7 @@
#define PRISM_PRECOMPILED_BASE_HEADERS_H
#include <algorithm>
#include <cstddef>
#include <functional>
#include <memory>
#include <optional>

View file

@ -5,9 +5,15 @@
#include <QEvent>
#include <QMetaType>
#include <QObject>
#include <QPointer>
#include <QSharedPointer>
#include <QVariant>
#include <QVariantMap>
#include <QDebug>
#include <QLoggingCategory>
#include <QCoreApplication>

View file

@ -41,6 +41,7 @@
#include <algorithm>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "java/JavaChecker.h"
#include "java/JavaInstallList.h"
#include "java/JavaUtils.h"

View file

@ -26,6 +26,7 @@
#include "net/NetJob.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "BuildConfig.h"
#include "tasks/Task.h"

View file

@ -37,6 +37,7 @@
#pragma once
#include "Application.h"
#include "BaseInstance.h"
#include <QList>
#include <QMessageBox>

View file

@ -2,7 +2,6 @@
#include <QImage>
#include <QList>
#include <QNetworkReply>
#include <QObject>
#include <QSet>

View file

@ -1,6 +1,5 @@
#pragma once
#include <QList>
#include <QNetworkReply>
#include <QObject>
#include "QObjectPtr.h"

View file

@ -37,6 +37,7 @@
#include <QAbstractOAuth2>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QOAuthHttpServerReplyHandler>
#include <QOAuthOobReplyHandler>

View file

@ -41,6 +41,7 @@
#include "tasks/ConcurrentTask.h"
#if defined(LAUNCHER_APPLICATION)
#include "Application.h"
#include "settings/SettingsObject.h"
#include "ui/dialogs/CustomMessageBox.h"
#endif

View file

@ -49,6 +49,7 @@
#if defined(LAUNCHER_APPLICATION)
#include "Application.h"
#include "settings/SettingsObject.h"
#endif
#include "BuildConfig.h"

View file

@ -53,6 +53,7 @@
#include "POTranslator.h"
#include "Application.h"
#include "settings/SettingsObject.h"
const static QLatin1String defaultLangCode("en_US");

View file

@ -27,6 +27,7 @@
#include "ui_BlockedModsDialog.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "modplatform/helpers/HashUtils.h"
#include <QDebug>

View file

@ -35,6 +35,7 @@
#include "MSALoginDialog.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "ui_MSALoginDialog.h"

View file

@ -33,6 +33,7 @@
#include <QUrl>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "DesktopServices.h"
#include "Json.h"
#include "QObjectPtr.h"

View file

@ -21,6 +21,7 @@
#include <QVBoxLayout>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "ui/widgets/PageContainer.h"

View file

@ -38,6 +38,7 @@
#include <QVBoxLayout>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "ui/widgets/LanguageSelectionWidget.h"
LanguagePage::LanguagePage(QWidget* parent) : QWidget(parent)

View file

@ -55,6 +55,7 @@
#include <QStyledItemDelegate>
#include <Application.h>
#include "settings/SettingsObject.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/ProgressDialog.h"

View file

@ -14,6 +14,7 @@
#include <memory>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "BuildConfig.h"
#include "modplatform/ResourceAPI.h"

View file

@ -23,6 +23,7 @@
#include <QIcon>
#include <QProcessEnvironment>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "Exception.h"
#include "FileSystem.h"
#include "Json.h"

View file

@ -35,6 +35,7 @@
#include "ListModel.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "net/ApiDownload.h"
#include "net/HttpMetaCache.h"
#include "net/NetJob.h"

View file

@ -35,6 +35,7 @@
#include "TechnicModel.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "BuildConfig.h"
#include "Json.h"

View file

@ -2,6 +2,7 @@
#include "ui_AutoJavaWizardPage.h"
#include "Application.h"
#include "settings/SettingsObject.h"
AutoJavaWizardPage::AutoJavaWizardPage(QWidget* parent) : BaseWizardPage(parent), ui(new Ui::AutoJavaWizardPage)
{

View file

@ -1,5 +1,6 @@
#include "JavaWizardPage.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include <QFileDialog>
#include <QGroupBox>

View file

@ -1,5 +1,6 @@
#include "LanguageWizardPage.h"
#include <Application.h>
#include "settings/SettingsObject.h"
#include <translations/TranslationsModel.h>
#include <BuildConfig.h>

View file

@ -2,6 +2,7 @@
#include "ui_PasteWizardPage.h"
#include "Application.h"
#include "settings/SettingsObject.h"
#include "net/PasteUpload.h"
PasteWizardPage::PasteWizardPage(QWidget* parent) : BaseWizardPage(parent), ui(new Ui::PasteWizardPage)

View file

@ -19,6 +19,7 @@
#include "ui/themes/CatPainter.h"
#include <QPixmap>
#include "Application.h"
#include "settings/SettingsObject.h"
CatPainter::CatPainter(const QString& path, QObject* parent) : QObject(parent)
{

View file

@ -33,6 +33,7 @@
#include "ui/themes/SystemTheme.h"
#include "Application.h"
#include "settings/SettingsObject.h"
ThemeManager::ThemeManager()
{

View file

@ -43,6 +43,9 @@
#include "ui/themes/ITheme.h"
#include "ui/themes/ThemeManager.h"
#include <Application.h>
#include "settings/SettingsObject.h"
AppearanceWidget::AppearanceWidget(bool themesOnly, QWidget* parent)
: QWidget(parent), m_ui(new Ui::AppearanceWidget), m_themesOnly(themesOnly)
{

View file

@ -20,13 +20,9 @@
#pragma once
#include <QDialog>
#include <memory>
#include <Application.h>
#include <translations/TranslationsModel.h>
#include <QTextCursor>
#include "java/JavaChecker.h"
#include "ui/pages/BasePage.h"
class QTextCharFormat;
class SettingsObject;

View file

@ -6,6 +6,7 @@
#include <QTreeView>
#include <QVBoxLayout>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "BuildConfig.h"
#include "settings/Setting.h"
#include "translations/TranslationsModel.h"