NOISSUE continue reshuffling the codebase

This commit is contained in:
Petr Mrázek 2021-11-22 03:55:16 +01:00
parent 5040231f8d
commit b258eac215
244 changed files with 516 additions and 768 deletions

View File

@ -24,6 +24,8 @@ endif()
##################################### Set CMake options #####################################
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")

View File

@ -1,36 +1,42 @@
#include "Application.h"
#include "BuildConfig.h"
#include "MainWindow.h"
#include "InstanceWindow.h"
#include "instanceview/AccessibleInstanceView.h"
#include <QAccessible>
#include "ui/MainWindow.h"
#include "ui/InstanceWindow.h"
#include "pages/BasePageProvider.h"
#include "pages/global/LauncherPage.h"
#include "pages/global/MinecraftPage.h"
#include "pages/global/JavaPage.h"
#include "pages/global/LanguagePage.h"
#include "pages/global/ProxyPage.h"
#include "pages/global/ExternalToolsPage.h"
#include "pages/global/AccountListPage.h"
#include "pages/global/PasteEEPage.h"
#include "pages/global/CustomCommandsPage.h"
#include "ui/instanceview/AccessibleInstanceView.h"
#include "themes/ITheme.h"
#include "themes/SystemTheme.h"
#include "themes/DarkTheme.h"
#include "themes/BrightTheme.h"
#include "themes/CustomTheme.h"
#include "ui/pages/BasePageProvider.h"
#include "ui/pages/global/LauncherPage.h"
#include "ui/pages/global/MinecraftPage.h"
#include "ui/pages/global/JavaPage.h"
#include "ui/pages/global/LanguagePage.h"
#include "ui/pages/global/ProxyPage.h"
#include "ui/pages/global/ExternalToolsPage.h"
#include "ui/pages/global/AccountListPage.h"
#include "ui/pages/global/PasteEEPage.h"
#include "ui/pages/global/CustomCommandsPage.h"
#include "ui/themes/ITheme.h"
#include "ui/themes/SystemTheme.h"
#include "ui/themes/DarkTheme.h"
#include "ui/themes/BrightTheme.h"
#include "ui/themes/CustomTheme.h"
#include "ui/setupwizard/SetupWizard.h"
#include "ui/setupwizard/LanguageWizardPage.h"
#include "ui/setupwizard/JavaWizardPage.h"
#include "ui/setupwizard/AnalyticsWizardPage.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/pagedialog/PageDialog.h"
#include "ApplicationMessage.h"
#include "setupwizard/SetupWizard.h"
#include "setupwizard/LanguageWizardPage.h"
#include "setupwizard/JavaWizardPage.h"
#include "setupwizard/AnalyticsWizardPage.h"
#include <iostream>
#include <QAccessible>
#include <QDir>
#include <QFileInfo>
#include <QNetworkAccessManager>
@ -41,7 +47,6 @@
#include <QDebug>
#include <QStyleFactory>
#include "dialogs/CustomMessageBox.h"
#include "InstanceList.h"
#include <minecraft/auth/AccountList.h>
@ -71,7 +76,6 @@
#include <ganalytics.h>
#include <sys.h>
#include "pagedialog/PageDialog.h"
#include <Secrets.h>

View File

@ -128,6 +128,8 @@ set(NET_SOURCES
# Game launch logic
set(LAUNCH_SOURCES
launch/steps/CheckJava.cpp
launch/steps/CheckJava.h
launch/steps/LookupServerAddress.cpp
launch/steps/LookupServerAddress.h
launch/steps/PostLaunchCommand.cpp
@ -419,9 +421,6 @@ add_unit_test(INIFile
)
set(JAVA_SOURCES
# Java related code
java/launch/CheckJava.cpp
java/launch/CheckJava.h
java/JavaChecker.h
java/JavaChecker.cpp
java/JavaCheckerJob.h
@ -568,20 +567,27 @@ SET(LAUNCHER_SOURCES
# GUI - general utilities
DesktopServices.h
DesktopServices.cpp
GuiUtil.h
GuiUtil.cpp
ColumnResizer.h
ColumnResizer.cpp
VersionProxyModel.h
VersionProxyModel.cpp
ColorCache.h
ColorCache.cpp
HoeDown.h
# Super secret!
KonamiCode.h
KonamiCode.cpp
# Bundled resources
resources/backgrounds/backgrounds.qrc
resources/multimc/multimc.qrc
resources/pe_dark/pe_dark.qrc
resources/pe_light/pe_light.qrc
resources/pe_colored/pe_colored.qrc
resources/pe_blue/pe_blue.qrc
resources/OSX/OSX.qrc
resources/iOS/iOS.qrc
resources/flat/flat.qrc
resources/documents/documents.qrc
../${Launcher_Branding_LogoQRC}
# Icons
icons/MMCIcon.h
icons/MMCIcon.cpp
@ -589,39 +595,43 @@ SET(LAUNCHER_SOURCES
icons/IconList.cpp
# GUI - windows
MainWindow.h
MainWindow.cpp
InstanceWindow.h
InstanceWindow.cpp
ui/GuiUtil.h
ui/GuiUtil.cpp
ui/ColorCache.h
ui/ColorCache.cpp
ui/MainWindow.h
ui/MainWindow.cpp
ui/InstanceWindow.h
ui/InstanceWindow.cpp
# FIXME: maybe find a better home for this.
SkinUtils.cpp
SkinUtils.h
# GUI - setup wizard
setupwizard/SetupWizard.h
setupwizard/SetupWizard.cpp
setupwizard/AnalyticsWizardPage.cpp
setupwizard/AnalyticsWizardPage.h
setupwizard/BaseWizardPage.h
setupwizard/JavaWizardPage.cpp
setupwizard/JavaWizardPage.h
setupwizard/LanguageWizardPage.cpp
setupwizard/LanguageWizardPage.h
ui/setupwizard/SetupWizard.h
ui/setupwizard/SetupWizard.cpp
ui/setupwizard/AnalyticsWizardPage.cpp
ui/setupwizard/AnalyticsWizardPage.h
ui/setupwizard/BaseWizardPage.h
ui/setupwizard/JavaWizardPage.cpp
ui/setupwizard/JavaWizardPage.h
ui/setupwizard/LanguageWizardPage.cpp
ui/setupwizard/LanguageWizardPage.h
# GUI - themes
themes/FusionTheme.cpp
themes/FusionTheme.h
themes/BrightTheme.cpp
themes/BrightTheme.h
themes/CustomTheme.cpp
themes/CustomTheme.h
themes/DarkTheme.cpp
themes/DarkTheme.h
themes/ITheme.cpp
themes/ITheme.h
themes/SystemTheme.cpp
themes/SystemTheme.h
ui/themes/FusionTheme.cpp
ui/themes/FusionTheme.h
ui/themes/BrightTheme.cpp
ui/themes/BrightTheme.h
ui/themes/CustomTheme.cpp
ui/themes/CustomTheme.h
ui/themes/DarkTheme.cpp
ui/themes/DarkTheme.h
ui/themes/ITheme.cpp
ui/themes/ITheme.h
ui/themes/SystemTheme.cpp
ui/themes/SystemTheme.h
# Processes
LaunchController.h
@ -635,255 +645,183 @@ SET(LAUNCHER_SOURCES
JavaCommon.cpp
# GUI - paged dialog base
pages/BasePage.h
pages/BasePageContainer.h
pages/BasePageProvider.h
ui/pages/BasePage.h
ui/pages/BasePageContainer.h
ui/pages/BasePageProvider.h
# GUI - instance pages
pages/instance/GameOptionsPage.cpp
pages/instance/GameOptionsPage.h
pages/instance/VersionPage.cpp
pages/instance/VersionPage.h
pages/instance/TexturePackPage.h
pages/instance/ResourcePackPage.h
pages/instance/ShaderPackPage.h
pages/instance/ModFolderPage.cpp
pages/instance/ModFolderPage.h
pages/instance/NotesPage.cpp
pages/instance/NotesPage.h
pages/instance/LogPage.cpp
pages/instance/LogPage.h
pages/instance/InstanceSettingsPage.cpp
pages/instance/InstanceSettingsPage.h
pages/instance/ScreenshotsPage.cpp
pages/instance/ScreenshotsPage.h
pages/instance/OtherLogsPage.cpp
pages/instance/OtherLogsPage.h
pages/instance/ServersPage.cpp
pages/instance/ServersPage.h
pages/instance/LegacyUpgradePage.cpp
pages/instance/LegacyUpgradePage.h
pages/instance/WorldListPage.cpp
pages/instance/WorldListPage.h
ui/pages/instance/GameOptionsPage.cpp
ui/pages/instance/GameOptionsPage.h
ui/pages/instance/VersionPage.cpp
ui/pages/instance/VersionPage.h
ui/pages/instance/TexturePackPage.h
ui/pages/instance/ResourcePackPage.h
ui/pages/instance/ShaderPackPage.h
ui/pages/instance/ModFolderPage.cpp
ui/pages/instance/ModFolderPage.h
ui/pages/instance/NotesPage.cpp
ui/pages/instance/NotesPage.h
ui/pages/instance/LogPage.cpp
ui/pages/instance/LogPage.h
ui/pages/instance/InstanceSettingsPage.cpp
ui/pages/instance/InstanceSettingsPage.h
ui/pages/instance/ScreenshotsPage.cpp
ui/pages/instance/ScreenshotsPage.h
ui/pages/instance/OtherLogsPage.cpp
ui/pages/instance/OtherLogsPage.h
ui/pages/instance/ServersPage.cpp
ui/pages/instance/ServersPage.h
ui/pages/instance/LegacyUpgradePage.cpp
ui/pages/instance/LegacyUpgradePage.h
ui/pages/instance/WorldListPage.cpp
ui/pages/instance/WorldListPage.h
# GUI - global settings pages
pages/global/AccountListPage.cpp
pages/global/AccountListPage.h
pages/global/CustomCommandsPage.cpp
pages/global/CustomCommandsPage.h
pages/global/ExternalToolsPage.cpp
pages/global/ExternalToolsPage.h
pages/global/JavaPage.cpp
pages/global/JavaPage.h
pages/global/LanguagePage.cpp
pages/global/LanguagePage.h
pages/global/MinecraftPage.cpp
pages/global/MinecraftPage.h
pages/global/LauncherPage.cpp
pages/global/LauncherPage.h
pages/global/ProxyPage.cpp
pages/global/ProxyPage.h
pages/global/PasteEEPage.cpp
pages/global/PasteEEPage.h
ui/pages/global/AccountListPage.cpp
ui/pages/global/AccountListPage.h
ui/pages/global/CustomCommandsPage.cpp
ui/pages/global/CustomCommandsPage.h
ui/pages/global/ExternalToolsPage.cpp
ui/pages/global/ExternalToolsPage.h
ui/pages/global/JavaPage.cpp
ui/pages/global/JavaPage.h
ui/pages/global/LanguagePage.cpp
ui/pages/global/LanguagePage.h
ui/pages/global/MinecraftPage.cpp
ui/pages/global/MinecraftPage.h
ui/pages/global/LauncherPage.cpp
ui/pages/global/LauncherPage.h
ui/pages/global/ProxyPage.cpp
ui/pages/global/ProxyPage.h
ui/pages/global/PasteEEPage.cpp
ui/pages/global/PasteEEPage.h
# GUI - platform pages
pages/modplatform/VanillaPage.cpp
pages/modplatform/VanillaPage.h
ui/pages/modplatform/VanillaPage.cpp
ui/pages/modplatform/VanillaPage.h
pages/modplatform/atlauncher/AtlFilterModel.cpp
pages/modplatform/atlauncher/AtlFilterModel.h
pages/modplatform/atlauncher/AtlListModel.cpp
pages/modplatform/atlauncher/AtlListModel.h
pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
pages/modplatform/atlauncher/AtlOptionalModDialog.h
pages/modplatform/atlauncher/AtlPage.cpp
pages/modplatform/atlauncher/AtlPage.h
ui/pages/modplatform/atlauncher/AtlFilterModel.cpp
ui/pages/modplatform/atlauncher/AtlFilterModel.h
ui/pages/modplatform/atlauncher/AtlListModel.cpp
ui/pages/modplatform/atlauncher/AtlListModel.h
ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
ui/pages/modplatform/atlauncher/AtlPage.cpp
ui/pages/modplatform/atlauncher/AtlPage.h
pages/modplatform/ftb/FtbFilterModel.cpp
pages/modplatform/ftb/FtbFilterModel.h
pages/modplatform/ftb/FtbListModel.cpp
pages/modplatform/ftb/FtbListModel.h
pages/modplatform/ftb/FtbPage.cpp
pages/modplatform/ftb/FtbPage.h
ui/pages/modplatform/ftb/FtbFilterModel.cpp
ui/pages/modplatform/ftb/FtbFilterModel.h
ui/pages/modplatform/ftb/FtbListModel.cpp
ui/pages/modplatform/ftb/FtbListModel.h
ui/pages/modplatform/ftb/FtbPage.cpp
ui/pages/modplatform/ftb/FtbPage.h
pages/modplatform/legacy_ftb/Page.cpp
pages/modplatform/legacy_ftb/Page.h
pages/modplatform/legacy_ftb/ListModel.h
pages/modplatform/legacy_ftb/ListModel.cpp
ui/pages/modplatform/legacy_ftb/Page.cpp
ui/pages/modplatform/legacy_ftb/Page.h
ui/pages/modplatform/legacy_ftb/ListModel.h
ui/pages/modplatform/legacy_ftb/ListModel.cpp
pages/modplatform/flame/FlameModel.cpp
pages/modplatform/flame/FlameModel.h
pages/modplatform/flame/FlamePage.cpp
pages/modplatform/flame/FlamePage.h
ui/pages/modplatform/flame/FlameModel.cpp
ui/pages/modplatform/flame/FlameModel.h
ui/pages/modplatform/flame/FlamePage.cpp
ui/pages/modplatform/flame/FlamePage.h
pages/modplatform/technic/TechnicModel.cpp
pages/modplatform/technic/TechnicModel.h
pages/modplatform/technic/TechnicPage.cpp
pages/modplatform/technic/TechnicPage.h
ui/pages/modplatform/technic/TechnicModel.cpp
ui/pages/modplatform/technic/TechnicModel.h
ui/pages/modplatform/technic/TechnicPage.cpp
ui/pages/modplatform/technic/TechnicPage.h
pages/modplatform/ImportPage.cpp
pages/modplatform/ImportPage.h
ui/pages/modplatform/ImportPage.cpp
ui/pages/modplatform/ImportPage.h
# GUI - dialogs
dialogs/AboutDialog.cpp
dialogs/AboutDialog.h
dialogs/ProfileSelectDialog.cpp
dialogs/ProfileSelectDialog.h
dialogs/ProfileSetupDialog.cpp
dialogs/ProfileSetupDialog.h
dialogs/CopyInstanceDialog.cpp
dialogs/CopyInstanceDialog.h
dialogs/CustomMessageBox.cpp
dialogs/CustomMessageBox.h
dialogs/EditAccountDialog.cpp
dialogs/EditAccountDialog.h
dialogs/ExportInstanceDialog.cpp
dialogs/ExportInstanceDialog.h
dialogs/IconPickerDialog.cpp
dialogs/IconPickerDialog.h
dialogs/LoginDialog.cpp
dialogs/LoginDialog.h
dialogs/MSALoginDialog.cpp
dialogs/MSALoginDialog.h
dialogs/NewComponentDialog.cpp
dialogs/NewComponentDialog.h
dialogs/NewInstanceDialog.cpp
dialogs/NewInstanceDialog.h
dialogs/NotificationDialog.cpp
dialogs/NotificationDialog.h
pagedialog/PageDialog.cpp
pagedialog/PageDialog.h
dialogs/ProgressDialog.cpp
dialogs/ProgressDialog.h
dialogs/UpdateDialog.cpp
dialogs/UpdateDialog.h
dialogs/VersionSelectDialog.cpp
dialogs/VersionSelectDialog.h
dialogs/SkinUploadDialog.cpp
dialogs/SkinUploadDialog.h
ui/dialogs/AboutDialog.cpp
ui/dialogs/AboutDialog.h
ui/dialogs/ProfileSelectDialog.cpp
ui/dialogs/ProfileSelectDialog.h
ui/dialogs/ProfileSetupDialog.cpp
ui/dialogs/ProfileSetupDialog.h
ui/dialogs/CopyInstanceDialog.cpp
ui/dialogs/CopyInstanceDialog.h
ui/dialogs/CustomMessageBox.cpp
ui/dialogs/CustomMessageBox.h
ui/dialogs/EditAccountDialog.cpp
ui/dialogs/EditAccountDialog.h
ui/dialogs/ExportInstanceDialog.cpp
ui/dialogs/ExportInstanceDialog.h
ui/dialogs/IconPickerDialog.cpp
ui/dialogs/IconPickerDialog.h
ui/dialogs/LoginDialog.cpp
ui/dialogs/LoginDialog.h
ui/dialogs/MSALoginDialog.cpp
ui/dialogs/MSALoginDialog.h
ui/dialogs/NewComponentDialog.cpp
ui/dialogs/NewComponentDialog.h
ui/dialogs/NewInstanceDialog.cpp
ui/dialogs/NewInstanceDialog.h
ui/dialogs/NotificationDialog.cpp
ui/dialogs/NotificationDialog.h
ui/pagedialog/PageDialog.cpp
ui/pagedialog/PageDialog.h
ui/dialogs/ProgressDialog.cpp
ui/dialogs/ProgressDialog.h
ui/dialogs/UpdateDialog.cpp
ui/dialogs/UpdateDialog.h
ui/dialogs/VersionSelectDialog.cpp
ui/dialogs/VersionSelectDialog.h
ui/dialogs/SkinUploadDialog.cpp
ui/dialogs/SkinUploadDialog.h
# GUI - widgets
widgets/Common.cpp
widgets/Common.h
widgets/CustomCommands.cpp
widgets/CustomCommands.h
widgets/DropLabel.cpp
widgets/DropLabel.h
widgets/FocusLineEdit.cpp
widgets/FocusLineEdit.h
widgets/IconLabel.cpp
widgets/IconLabel.h
widgets/JavaSettingsWidget.cpp
widgets/JavaSettingsWidget.h
widgets/LabeledToolButton.cpp
widgets/LabeledToolButton.h
widgets/LanguageSelectionWidget.cpp
widgets/LanguageSelectionWidget.h
widgets/LineSeparator.cpp
widgets/LineSeparator.h
widgets/LogView.cpp
widgets/LogView.h
widgets/MCModInfoFrame.cpp
widgets/MCModInfoFrame.h
widgets/ModListView.cpp
widgets/ModListView.h
widgets/PageContainer.cpp
widgets/PageContainer.h
widgets/PageContainer_p.h
widgets/VersionListView.cpp
widgets/VersionListView.h
widgets/VersionSelectWidget.cpp
widgets/VersionSelectWidget.h
widgets/ProgressWidget.h
widgets/ProgressWidget.cpp
widgets/WideBar.h
widgets/WideBar.cpp
ui/widgets/Common.cpp
ui/widgets/Common.h
ui/widgets/CustomCommands.cpp
ui/widgets/CustomCommands.h
ui/widgets/DropLabel.cpp
ui/widgets/DropLabel.h
ui/widgets/FocusLineEdit.cpp
ui/widgets/FocusLineEdit.h
ui/widgets/IconLabel.cpp
ui/widgets/IconLabel.h
ui/widgets/JavaSettingsWidget.cpp
ui/widgets/JavaSettingsWidget.h
ui/widgets/LabeledToolButton.cpp
ui/widgets/LabeledToolButton.h
ui/widgets/LanguageSelectionWidget.cpp
ui/widgets/LanguageSelectionWidget.h
ui/widgets/LineSeparator.cpp
ui/widgets/LineSeparator.h
ui/widgets/LogView.cpp
ui/widgets/LogView.h
ui/widgets/MCModInfoFrame.cpp
ui/widgets/MCModInfoFrame.h
ui/widgets/ModListView.cpp
ui/widgets/ModListView.h
ui/widgets/PageContainer.cpp
ui/widgets/PageContainer.h
ui/widgets/PageContainer_p.h
ui/widgets/VersionListView.cpp
ui/widgets/VersionListView.h
ui/widgets/VersionSelectWidget.cpp
ui/widgets/VersionSelectWidget.h
ui/widgets/ProgressWidget.h
ui/widgets/ProgressWidget.cpp
ui/widgets/WideBar.h
ui/widgets/WideBar.cpp
# GUI - instance group view
instanceview/InstanceProxyModel.cpp
instanceview/InstanceProxyModel.h
instanceview/AccessibleInstanceView.cpp
instanceview/AccessibleInstanceView.h
instanceview/AccessibleInstanceView_p.h
instanceview/InstanceView.cpp
instanceview/InstanceView.h
instanceview/InstanceDelegate.cpp
instanceview/InstanceDelegate.h
instanceview/VisualGroup.cpp
instanceview/VisualGroup.h
)
######## UIs ########
SET(LAUNCHER_UIS
# Instance pages
pages/instance/GameOptionsPage.ui
pages/instance/VersionPage.ui
pages/instance/ModFolderPage.ui
pages/instance/LogPage.ui
pages/instance/InstanceSettingsPage.ui
pages/instance/NotesPage.ui
pages/instance/ScreenshotsPage.ui
pages/instance/OtherLogsPage.ui
pages/instance/LegacyUpgradePage.ui
pages/instance/ServersPage.ui
pages/instance/WorldListPage.ui
# Global settings pages
pages/global/AccountListPage.ui
pages/global/ExternalToolsPage.ui
pages/global/JavaPage.ui
pages/global/MinecraftPage.ui
pages/global/LauncherPage.ui
pages/global/ProxyPage.ui
pages/global/PasteEEPage.ui
# Platform pages
pages/modplatform/VanillaPage.ui
pages/modplatform/atlauncher/AtlPage.ui
pages/modplatform/ftb/FtbPage.ui
pages/modplatform/legacy_ftb/Page.ui
pages/modplatform/flame/FlamePage.ui
pages/modplatform/technic/TechnicPage.ui
pages/modplatform/ImportPage.ui
# Platform Dialogs
pages/modplatform/atlauncher/AtlOptionalModDialog.ui
# Dialogs
dialogs/CopyInstanceDialog.ui
dialogs/NewComponentDialog.ui
dialogs/NewInstanceDialog.ui
dialogs/AboutDialog.ui
dialogs/ProgressDialog.ui
dialogs/IconPickerDialog.ui
dialogs/ProfileSelectDialog.ui
dialogs/ProfileSetupDialog.ui
dialogs/EditAccountDialog.ui
dialogs/ExportInstanceDialog.ui
dialogs/LoginDialog.ui
dialogs/MSALoginDialog.ui
dialogs/UpdateDialog.ui
dialogs/NotificationDialog.ui
dialogs/SkinUploadDialog.ui
# Widgets/other
widgets/CustomCommands.ui
widgets/MCModInfoFrame.ui
)
set(LAUNCHER_QRCS
resources/backgrounds/backgrounds.qrc
resources/multimc/multimc.qrc
resources/pe_dark/pe_dark.qrc
resources/pe_light/pe_light.qrc
resources/pe_colored/pe_colored.qrc
resources/pe_blue/pe_blue.qrc
resources/OSX/OSX.qrc
resources/iOS/iOS.qrc
resources/flat/flat.qrc
resources/documents/documents.qrc
../${Launcher_Branding_LogoQRC}
ui/instanceview/InstanceProxyModel.cpp
ui/instanceview/InstanceProxyModel.h
ui/instanceview/AccessibleInstanceView.cpp
ui/instanceview/AccessibleInstanceView.h
ui/instanceview/AccessibleInstanceView_p.h
ui/instanceview/InstanceView.cpp
ui/instanceview/InstanceView.h
ui/instanceview/InstanceDelegate.cpp
ui/instanceview/InstanceDelegate.h
ui/instanceview/VisualGroup.cpp
ui/instanceview/VisualGroup.h
)
######## Windows resource files ########
@ -891,12 +829,8 @@ if(WIN32)
set(LAUNCHER_RCS ../${Launcher_Branding_WindowsRC})
endif()
# Qt 5 stuff
qt5_wrap_ui(LAUNCHER_UI ${LAUNCHER_UIS})
qt5_add_resources(LAUNCHER_RESOURCES ${LAUNCHER_QRCS})
# Add executable
add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES} ${LAUNCHER_UI} ${LAUNCHER_RESOURCES})
add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES})
target_link_libraries(Launcher_logic
systeminfo
Launcher_quazip

View File

@ -1,199 +0,0 @@
/*
* Copyright 2011 Aurélien Gâteau <agateau@kde.org>
* License: BSD-3-Clause
*/
#include <ColumnResizer.h>
#include <QDebug>
#include <QEvent>
#include <QFormLayout>
#include <QGridLayout>
#include <QTimer>
#include <QWidget>
class FormLayoutWidgetItem : public QWidgetItem
{
public:
FormLayoutWidgetItem(QWidget* widget, QFormLayout* formLayout, QFormLayout::ItemRole itemRole)
: QWidgetItem(widget)
, m_width(-1)
, m_formLayout(formLayout)
, m_itemRole(itemRole)
{}
QSize sizeHint() const
{
QSize size = QWidgetItem::sizeHint();
if (m_width != -1) {
size.setWidth(m_width);
}
return size;
}
QSize minimumSize() const
{
QSize size = QWidgetItem::minimumSize();
if (m_width != -1) {
size.setWidth(m_width);
}
return size;
}
QSize maximumSize() const
{
QSize size = QWidgetItem::maximumSize();
if (m_width != -1) {
size.setWidth(m_width);
}
return size;
}
void setWidth(int width)
{
if (width != m_width) {
m_width = width;
invalidate();
}
}
void setGeometry(const QRect& _rect)
{
QRect rect = _rect;
int width = widget()->sizeHint().width();
if (m_itemRole == QFormLayout::LabelRole && m_formLayout->labelAlignment() & Qt::AlignRight) {
rect.setLeft(rect.right() - width);
}
QWidgetItem::setGeometry(rect);
}
QFormLayout* formLayout() const
{
return m_formLayout;
}
private:
int m_width;
QFormLayout* m_formLayout;
QFormLayout::ItemRole m_itemRole;
};
typedef QPair<QGridLayout*, int> GridColumnInfo;
class ColumnResizerPrivate
{
public:
ColumnResizerPrivate(ColumnResizer* q_ptr)
: q(q_ptr)
, m_updateTimer(new QTimer(q))
{
m_updateTimer->setSingleShot(true);
m_updateTimer->setInterval(0);
QObject::connect(m_updateTimer, SIGNAL(timeout()), q, SLOT(updateWidth()));
}
void scheduleWidthUpdate()
{
m_updateTimer->start();
}
ColumnResizer* q;
QTimer* m_updateTimer;
QList<QWidget*> m_widgets;
QList<FormLayoutWidgetItem*> m_wrWidgetItemList;
QList<GridColumnInfo> m_gridColumnInfoList;
};
ColumnResizer::ColumnResizer(QObject* parent)
: QObject(parent)
, d(new ColumnResizerPrivate(this))
{}
ColumnResizer::~ColumnResizer()
{
delete d;
}
void ColumnResizer::addWidget(QWidget* widget)
{
d->m_widgets.append(widget);
widget->installEventFilter(this);
d->scheduleWidthUpdate();
}
void ColumnResizer::updateWidth()
{
int width = 0;
Q_FOREACH(QWidget* widget, d->m_widgets) {
width = qMax(widget->sizeHint().width(), width);
}
Q_FOREACH(FormLayoutWidgetItem* item, d->m_wrWidgetItemList) {
item->setWidth(width);
item->formLayout()->update();
}
Q_FOREACH(GridColumnInfo info, d->m_gridColumnInfoList) {
info.first->setColumnMinimumWidth(info.second, width);
}
}
bool ColumnResizer::eventFilter(QObject*, QEvent* event)
{
if (event->type() == QEvent::Resize) {
d->scheduleWidthUpdate();
}
return false;
}
void ColumnResizer::addWidgetsFromLayout(QLayout* layout, int column)
{
Q_ASSERT(column >= 0);
QGridLayout* gridLayout = qobject_cast<QGridLayout*>(layout);
QFormLayout* formLayout = qobject_cast<QFormLayout*>(layout);
if (gridLayout) {
addWidgetsFromGridLayout(gridLayout, column);
} else if (formLayout) {
if (column > QFormLayout::SpanningRole) {
qCritical() << "column should not be more than" << QFormLayout::SpanningRole << "for QFormLayout";
return;
}
QFormLayout::ItemRole role = static_cast<QFormLayout::ItemRole>(column);
addWidgetsFromFormLayout(formLayout, role);
} else {
qCritical() << "Don't know how to handle layout" << layout;
}
}
void ColumnResizer::addWidgetsFromGridLayout(QGridLayout* layout, int column)
{
for (int row = 0; row < layout->rowCount(); ++row) {
QLayoutItem* item = layout->itemAtPosition(row, column);
if (!item) {
continue;
}
QWidget* widget = item->widget();
if (!widget) {
continue;
}
addWidget(widget);
}
d->m_gridColumnInfoList << GridColumnInfo(layout, column);
}
void ColumnResizer::addWidgetsFromFormLayout(QFormLayout* layout, QFormLayout::ItemRole role)
{
for (int row = 0; row < layout->rowCount(); ++row) {
QLayoutItem* item = layout->itemAt(row, role);
if (!item) {
continue;
}
QWidget* widget = item->widget();
if (!widget) {
continue;
}
layout->removeItem(item);
delete item;
FormLayoutWidgetItem* newItem = new FormLayoutWidgetItem(widget, layout, role);
layout->setItem(row, role, newItem);
addWidget(widget);
d->m_wrWidgetItemList << newItem;
}
}

View File

@ -1,41 +0,0 @@
/*
* Copyright 2011 Aurélien Gâteau <agateau@kde.org>
* License: BSD-3-Clause
*/
#ifndef COLUMNRESIZER_H
#define COLUMNRESIZER_H
#include <QFormLayout>
#include <QtCore/QObject>
#include <QtCore/QList>
class QEvent;
class QGridLayout;
class QLayout;
class QWidget;
class ColumnResizerPrivate;
class ColumnResizer : public QObject
{
Q_OBJECT
public:
ColumnResizer(QObject* parent = 0);
~ColumnResizer();
void addWidget(QWidget* widget);
void addWidgetsFromLayout(QLayout*, int column);
void addWidgetsFromGridLayout(QGridLayout*, int column);
void addWidgetsFromFormLayout(QFormLayout*, QFormLayout::ItemRole role);
private Q_SLOTS:
void updateWidth();
protected:
bool eventFilter(QObject*, QEvent* event);
private:
ColumnResizerPrivate* const d;
};
#endif /* COLUMNRESIZER_H */

View File

@ -2,22 +2,22 @@
#include "minecraft/MinecraftInstance.h"
#include "minecraft/legacy/LegacyInstance.h"
#include <FileSystem.h>
#include "pages/BasePage.h"
#include "pages/BasePageProvider.h"
#include "pages/instance/LogPage.h"
#include "pages/instance/VersionPage.h"
#include "pages/instance/ModFolderPage.h"
#include "pages/instance/ResourcePackPage.h"
#include "pages/instance/TexturePackPage.h"
#include "pages/instance/ShaderPackPage.h"
#include "pages/instance/NotesPage.h"
#include "pages/instance/ScreenshotsPage.h"
#include "pages/instance/InstanceSettingsPage.h"
#include "pages/instance/OtherLogsPage.h"
#include "pages/instance/LegacyUpgradePage.h"
#include "pages/instance/WorldListPage.h"
#include "pages/instance/ServersPage.h"
#include "pages/instance/GameOptionsPage.h"
#include "ui/pages/BasePage.h"
#include "ui/pages/BasePageProvider.h"
#include "ui/pages/instance/LogPage.h"
#include "ui/pages/instance/VersionPage.h"
#include "ui/pages/instance/ModFolderPage.h"
#include "ui/pages/instance/ResourcePackPage.h"
#include "ui/pages/instance/TexturePackPage.h"
#include "ui/pages/instance/ShaderPackPage.h"
#include "ui/pages/instance/NotesPage.h"
#include "ui/pages/instance/ScreenshotsPage.h"
#include "ui/pages/instance/InstanceSettingsPage.h"
#include "ui/pages/instance/OtherLogsPage.h"
#include "ui/pages/instance/LegacyUpgradePage.h"
#include "ui/pages/instance/WorldListPage.h"
#include "ui/pages/instance/ServersPage.h"
#include "ui/pages/instance/GameOptionsPage.h"
class InstancePageProvider : public QObject, public BasePageProvider
{

View File

@ -1,5 +1,5 @@
#include "JavaCommon.h"
#include "dialogs/CustomMessageBox.h"
#include "ui/dialogs/CustomMessageBox.h"
#include <MMCStrings.h>
bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent)

View File

@ -1,24 +1,27 @@
#include "LaunchController.h"
#include "MainWindow.h"
#include <minecraft/auth/AccountList.h>
#include "minecraft/auth/AccountList.h"
#include "Application.h"
#include "dialogs/CustomMessageBox.h"
#include "dialogs/ProfileSelectDialog.h"
#include "dialogs/ProgressDialog.h"
#include "dialogs/EditAccountDialog.h"
#include "InstanceWindow.h"
#include "BuildConfig.h"
#include "JavaCommon.h"
#include "ui/MainWindow.h"
#include "ui/InstanceWindow.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/ProfileSelectDialog.h"
#include "ui/dialogs/ProgressDialog.h"
#include "ui/dialogs/EditAccountDialog.h"
#include "ui/dialogs/ProfileSetupDialog.h"
#include <QLineEdit>
#include <QInputDialog>
#include <tasks/Task.h>
#include <minecraft/auth/AccountTask.h>
#include <launch/steps/TextPrint.h>
#include <QStringList>
#include <QHostInfo>
#include <QList>
#include <QHostAddress>
#include "dialogs/ProfileSetupDialog.h"
#include "BuildConfig.h"
#include "JavaCommon.h"
#include "tasks/Task.h"
#include "minecraft/auth/AccountTask.h"
#include "launch/steps/TextPrint.h"
LaunchController::LaunchController(QObject *parent) : Task(parent)
{

View File

@ -1,8 +1,4 @@
#include "Application.h"
#include "MainWindow.h"
#include "LaunchController.h"
#include <InstanceList.h>
#include <QDebug>
// #define BREAK_INFINITE_LOOP
// #define BREAK_EXCEPTION

View File

@ -19,6 +19,7 @@
#include "launch/steps/Update.h"
#include "launch/steps/PreLaunchCommand.h"
#include "launch/steps/TextPrint.h"
#include "launch/steps/CheckJava.h"
#include "minecraft/launch/LauncherPartLaunch.h"
#include "minecraft/launch/DirectJavaLaunch.h"
@ -28,7 +29,6 @@
#include "minecraft/launch/ScanModFolders.h"
#include "minecraft/launch/VerifyJavaInstall.h"
#include "java/launch/CheckJava.h"
#include "java/JavaUtils.h"
#include "meta/Index.h"

View File

@ -4,9 +4,9 @@
#include <QApplication>
#include <QFileDialog>
#include "dialogs/ProgressDialog.h"
#include "ui/dialogs/ProgressDialog.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "net/PasteUpload.h"
#include "dialogs/CustomMessageBox.h"
#include "Application.h"
#include <settings/SettingsObject.h>
@ -35,8 +35,12 @@ QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
dialog.execWithTask(paste.get());
if (!paste->wasSuccessful())
{
CustomMessageBox::selectable(parentWidget, QObject::tr("Upload failed"),
paste->failReason(), QMessageBox::Critical)->exec();
CustomMessageBox::selectable(
parentWidget,
QObject::tr("Upload failed"),
paste->failReason(),
QMessageBox::Critical
)->exec();
return QString();
}
else
@ -66,8 +70,9 @@ static QStringList BrowseForFileInternal(QString context, QString caption, QStri
{
QString location = QStandardPaths::writableLocation(l);
QFileInfo finfo(location);
if (!finfo.exists())
if (!finfo.exists()) {
return;
}
locations.insert(location);
};
f(QStandardPaths::DesktopLocation);

View File

@ -23,9 +23,10 @@
#include <qlayoutitem.h>
#include <QCloseEvent>
#include <dialogs/CustomMessageBox.h>
#include <dialogs/ProgressDialog.h>
#include "widgets/PageContainer.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/ProgressDialog.h"
#include "ui/widgets/PageContainer.h"
#include "InstancePageProvider.h"
#include "icons/IconList.h"

View File

@ -16,11 +16,14 @@
#pragma once
#include <QMainWindow>
#include "LaunchController.h"
#include <QObjectPtr.h>
#include <QSystemTrayIcon>
#include "LaunchController.h"
#include "launch/LaunchTask.h"
#include "pages/BasePageContainer.h"
#include "ui/pages/BasePageContainer.h"
#include "QObjectPtr.h"
class QPushButton;
class PageContainer;

View File

@ -66,27 +66,31 @@
#include <DesktopServices.h>
#include "InstanceWindow.h"
#include "InstancePageProvider.h"
#include "instanceview/InstanceProxyModel.h"
#include "JavaCommon.h"
#include "LaunchController.h"
#include "instanceview/InstanceView.h"
#include "instanceview/InstanceDelegate.h"
#include "widgets/LabeledToolButton.h"
#include "dialogs/NewInstanceDialog.h"
#include "dialogs/ProgressDialog.h"
#include "dialogs/AboutDialog.h"
#include "dialogs/VersionSelectDialog.h"
#include "dialogs/CustomMessageBox.h"
#include "dialogs/IconPickerDialog.h"
#include "dialogs/CopyInstanceDialog.h"
#include "dialogs/UpdateDialog.h"
#include "dialogs/EditAccountDialog.h"
#include "dialogs/NotificationDialog.h"
#include "dialogs/ExportInstanceDialog.h"
#include <InstanceImportTask.h>
#include "ui/instanceview/InstanceProxyModel.h"
#include "ui/instanceview/InstanceView.h"
#include "ui/instanceview/InstanceDelegate.h"
#include "ui/widgets/LabeledToolButton.h"
#include "ui/dialogs/NewInstanceDialog.h"
#include "ui/dialogs/ProgressDialog.h"
#include "ui/dialogs/AboutDialog.h"
#include "ui/dialogs/VersionSelectDialog.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/IconPickerDialog.h"
#include "ui/dialogs/CopyInstanceDialog.h"
#include "ui/dialogs/UpdateDialog.h"
#include "ui/dialogs/EditAccountDialog.h"
#include "ui/dialogs/NotificationDialog.h"
#include "ui/dialogs/ExportInstanceDialog.h"
#include "UpdateController.h"
#include "KonamiCode.h"
#include <InstanceCopyTask.h>
#include "InstanceImportTask.h"
#include "InstanceCopyTask.h"
#include "MMCTime.h"
namespace {

View File

@ -20,7 +20,7 @@
#include "CopyInstanceDialog.h"
#include "ui_CopyInstanceDialog.h"
#include "dialogs/IconPickerDialog.h"
#include "ui/dialogs/IconPickerDialog.h"
#include "BaseVersion.h"
#include "icons/IconList.h"

View File

@ -22,7 +22,7 @@
#include "IconPickerDialog.h"
#include "ui_IconPickerDialog.h"
#include "instanceview/InstanceDelegate.h"
#include "ui/instanceview/InstanceDelegate.h"
#include "icons/IconList.h"
#include "icons/IconUtils.h"

View File

@ -32,14 +32,14 @@
#include <QValidator>
#include <QDialogButtonBox>
#include "widgets/PageContainer.h"
#include <pages/modplatform/VanillaPage.h>
#include <pages/modplatform/atlauncher/AtlPage.h>
#include <pages/modplatform/ftb/FtbPage.h>
#include <pages/modplatform/legacy_ftb/Page.h>
#include <pages/modplatform/flame/FlamePage.h>
#include <pages/modplatform/ImportPage.h>
#include <pages/modplatform/technic/TechnicPage.h>
#include "ui/widgets/PageContainer.h"
#include "ui/pages/modplatform/VanillaPage.h"
#include "ui/pages/modplatform/atlauncher/AtlPage.h"
#include "ui/pages/modplatform/ftb/FtbPage.h"
#include "ui/pages/modplatform/legacy_ftb/Page.h"
#include "ui/pages/modplatform/flame/FlamePage.h"
#include "ui/pages/modplatform/ImportPage.h"
#include "ui/pages/modplatform/technic/TechnicPage.h"

View File

@ -18,7 +18,7 @@
#include <QDialog>
#include "BaseVersion.h"
#include "pages/BasePageProvider.h"
#include "ui/pages/BasePageProvider.h"
#include "InstanceTask.h"
namespace Ui

View File

@ -14,16 +14,15 @@
*/
#include "ProfileSelectDialog.h"
#include <SkinUtils.h>
#include "ui_ProfileSelectDialog.h"
#include <QItemSelectionModel>
#include <QDebug>
#include <dialogs/ProgressDialog.h>
#include "SkinUtils.h"
#include "Application.h"
#include <Application.h>
#include "ui/dialogs/ProgressDialog.h"
ProfileSelectDialog::ProfileSelectDialog(const QString &message, int flags, QWidget *parent)
: QDialog(parent), ui(new Ui::ProfileSelectDialog)

View File

@ -19,15 +19,15 @@
#include <QPushButton>
#include <QAction>
#include <QRegExpValidator>
#include <QJsonDocument>
#include <QDebug>
#include <dialogs/ProgressDialog.h>
#include "ui/dialogs/ProgressDialog.h"
#include <Application.h>
#include <minecraft/auth/flows/AuthRequest.h>
#include <minecraft/auth/flows/Parsers.h>
#include "minecraft/auth/flows/AuthRequest.h"
#include "minecraft/auth/flows/Parsers.h"
#include <QJsonDocument>
ProfileSetupDialog::ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidget *parent)
: QDialog(parent), m_accountToSetup(accountToSetup), ui(new Ui::ProfileSetupDialog)

View File

@ -20,17 +20,17 @@
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>
#include <dialogs/ProgressDialog.h>
#include "CustomMessageBox.h"
#include <BaseVersion.h>
#include <BaseVersionList.h>
#include <tasks/Task.h>
#include <QDebug>
#include "ui/dialogs/ProgressDialog.h"
#include "ui/widgets/VersionSelectWidget.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "BaseVersion.h"
#include "BaseVersionList.h"
#include "tasks/Task.h"
#include "Application.h"
#include <VersionProxyModel.h>
#include <widgets/VersionSelectWidget.h>
#include "VersionProxyModel.h"
VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent, bool cancelable)
: QDialog(parent)

View File

@ -22,8 +22,9 @@
#include "Application.h"
#include "settings/SettingsObject.h"
#include "widgets/IconLabel.h"
#include "widgets/PageContainer.h"
#include "ui/widgets/IconLabel.h"
#include "ui/widgets/PageContainer.h"
PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidget *parent)
: QDialog(parent)

View File

@ -16,7 +16,7 @@
#pragma once
#include <QDialog>
#include "pages/BasePageProvider.h"
#include "ui/pages/BasePageProvider.h"
class PageContainer;
class PageDialog : public QDialog

View File

@ -15,7 +15,7 @@
#pragma once
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include <memory>
#include <functional>

View File

@ -23,10 +23,12 @@
#include "net/NetJob.h"
#include "dialogs/ProgressDialog.h"
#include "dialogs/LoginDialog.h"
#include "dialogs/CustomMessageBox.h"
#include "dialogs/SkinUploadDialog.h"
#include "ui/dialogs/ProgressDialog.h"
#include "ui/dialogs/LoginDialog.h"
#include "ui/dialogs/MSALoginDialog.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/SkinUploadDialog.h"
#include "tasks/Task.h"
#include "minecraft/auth/AccountTask.h"
#include "minecraft/services/SkinDelete.h"
@ -34,7 +36,6 @@
#include "Application.h"
#include "BuildConfig.h"
#include <dialogs/MSALoginDialog.h>
#include "Secrets.h"

View File

@ -18,7 +18,7 @@
#include <QMainWindow>
#include <memory>
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include "minecraft/auth/AccountList.h"
#include "Application.h"

View File

@ -116,12 +116,12 @@
<customwidget>
<class>VersionListView</class>
<extends>QTreeView</extends>
<header>widgets/VersionListView.h</header>
<header>ui/widgets/VersionListView.h</header>
</customwidget>
<customwidget>
<class>WideBar</class>
<extends>QToolBar</extends>
<header>widgets/WideBar.h</header>
<header>ui/widgets/WideBar.h</header>
</customwidget>
</customwidgets>
<resources/>

View File

@ -18,9 +18,9 @@
#include <memory>
#include <QDialog>
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include <Application.h>
#include "widgets/CustomCommands.h"
#include "ui/widgets/CustomCommands.h"
class CustomCommandsPage : public QWidget, public BasePage
{

View File

@ -17,7 +17,7 @@
#include <QWidget>
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include <Application.h>
namespace Ui {

View File

@ -22,7 +22,7 @@
#include <QDir>
#include <QTabBar>
#include "dialogs/VersionSelectDialog.h"
#include "ui/dialogs/VersionSelectDialog.h"
#include "java/JavaUtils.h"
#include "java/JavaInstallList.h"

View File

@ -17,7 +17,7 @@
#include <memory>
#include <QDialog>
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include "JavaCommon.h"
#include <Application.h>
#include <QObjectPtr.h>

View File

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

View File

@ -16,7 +16,7 @@
#pragma once
#include <memory>
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include <Application.h>
#include <QWidget>

View File

@ -27,7 +27,7 @@
#include <FileSystem.h>
#include "Application.h"
#include "BuildConfig.h"
#include "themes/ITheme.h"
#include "ui/themes/ITheme.h"
#include <QApplication>
#include <QProcess>

View File

@ -19,9 +19,9 @@
#include <QDialog>
#include "java/JavaChecker.h"
#include "pages/BasePage.h"
#include "ui/pages/BasePage.h"
#include <Application.h>
#include "ColorCache.h"
#include "ui/ColorCache.h"
#include <translations/TranslationsModel.h>
class QTextCharFormat;

Some files were not shown because too many files have changed in this diff Show More