mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Application.h cleanup (#4502)
This commit is contained in:
commit
157ae6fb72
31 changed files with 46 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#define PRISM_PRECOMPILED_BASE_HEADERS_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,15 @@
|
|||
#include <QEvent>
|
||||
#include <QMetaType>
|
||||
#include <QObject>
|
||||
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include <QVariant>
|
||||
#include <QVariantMap>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "net/NetJob.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "BuildConfig.h"
|
||||
#include "tasks/Task.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#pragma once
|
||||
#include "Application.h"
|
||||
#include "BaseInstance.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMessageBox>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <QImage>
|
||||
#include <QList>
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
#include <QList>
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
|
||||
#include "QObjectPtr.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <QAbstractOAuth2>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
#include <QOAuthHttpServerReplyHandler>
|
||||
#include <QOAuthOobReplyHandler>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#endif
|
||||
#include "BuildConfig.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
#include "POTranslator.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
const static QLatin1String defaultLangCode("en_US");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "ui_BlockedModsDialog.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "modplatform/helpers/HashUtils.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "MSALoginDialog.h"
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
#include "ui_MSALoginDialog.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <QUrl>
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "DesktopServices.h"
|
||||
#include "Json.h"
|
||||
#include "QObjectPtr.h"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <QVBoxLayout>
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
#include "ui/widgets/PageContainer.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include <QVBoxLayout>
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "ui/widgets/LanguageSelectionWidget.h"
|
||||
|
||||
LanguagePage::LanguagePage(QWidget* parent) : QWidget(parent)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
#include <QStyledItemDelegate>
|
||||
|
||||
#include <Application.h>
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
#include "ui/dialogs/CustomMessageBox.h"
|
||||
#include "ui/dialogs/ProgressDialog.h"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "BuildConfig.h"
|
||||
|
||||
#include "modplatform/ResourceAPI.h"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <QIcon>
|
||||
#include <QProcessEnvironment>
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "Exception.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Json.h"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "TechnicModel.h"
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "BuildConfig.h"
|
||||
#include "Json.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "JavaWizardPage.h"
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QGroupBox>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "LanguageWizardPage.h"
|
||||
#include <Application.h>
|
||||
#include "settings/SettingsObject.h"
|
||||
#include <translations/TranslationsModel.h>
|
||||
|
||||
#include <BuildConfig.h>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "ui/themes/SystemTheme.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
|
||||
ThemeManager::ThemeManager()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue