GH-1053 move launch related things and rename them

This commit is contained in:
Petr Mrázek
2015-07-10 01:11:06 +02:00
parent 5dd48e89f5
commit 8e7caf4e25
24 changed files with 91 additions and 89 deletions

View File

@ -53,8 +53,8 @@ private:
BasePage * m_log_page;
};
ConsoleWindow::ConsoleWindow(std::shared_ptr<BaseLauncher> process, QWidget *parent)
: QMainWindow(parent), m_proc(process)
ConsoleWindow::ConsoleWindow(std::shared_ptr<LaunchTask> proc, QWidget *parent)
: QMainWindow(parent), m_proc(proc)
{
MultiMCPlatform::fixWM_CLASS(this);
setAttribute(Qt::WA_DeleteOnClose);
@ -129,8 +129,8 @@ ConsoleWindow::ConsoleWindow(std::shared_ptr<BaseLauncher> process, QWidget *par
}
// Set up signal connections
connect(m_proc.get(), &BaseLauncher::succeeded, this, &ConsoleWindow::onSucceeded);
connect(m_proc.get(), &BaseLauncher::failed, this, &ConsoleWindow::onFailed);
connect(m_proc.get(), &LaunchTask::succeeded, this, &ConsoleWindow::onSucceeded);
connect(m_proc.get(), &LaunchTask::failed, this, &ConsoleWindow::onFailed);
setMayClose(false);

View File

@ -17,7 +17,7 @@
#include <QMainWindow>
#include <QSystemTrayIcon>
#include "BaseLauncher.h"
#include "launch/LaunchTask.h"
class QPushButton;
class PageContainer;
@ -26,7 +26,7 @@ class ConsoleWindow : public QMainWindow
Q_OBJECT
public:
explicit ConsoleWindow(std::shared_ptr<BaseLauncher> proc, QWidget *parent = 0);
explicit ConsoleWindow(std::shared_ptr<LaunchTask> proc, QWidget *parent = 0);
virtual ~ConsoleWindow();
/**
@ -56,7 +56,7 @@ protected:
void closeEvent(QCloseEvent *);
private:
std::shared_ptr<BaseLauncher> m_proc;
std::shared_ptr<LaunchTask> m_proc;
bool m_mayclose = true;
QSystemTrayIcon *m_trayIcon = nullptr;
PageContainer *m_container = nullptr;

View File

@ -170,7 +170,7 @@ void LaunchController::launchInstance()
m_console = new ConsoleWindow(m_launcher);
connect(m_console, &ConsoleWindow::isClosing, this, &LaunchController::instanceEnded);
connect(m_launcher.get(), &BaseLauncher::readyForLaunch, this, &LaunchController::readyForLaunch);
connect(m_launcher.get(), &LaunchTask::readyForLaunch, this, &LaunchController::readyForLaunch);
m_launcher->setHeader("MultiMC version: " + BuildConfig.printableVersionString() + "\n\n");
m_launcher->start();

View File

@ -45,5 +45,5 @@ private:
QWidget * m_parentWidget = nullptr;
ConsoleWindow *m_console = nullptr;
AuthSessionPtr m_session;
std::shared_ptr <BaseLauncher> m_launcher;
std::shared_ptr <LaunchTask> m_launcher;
};

View File

@ -368,7 +368,7 @@ namespace Ui {
#include "Env.h"
#include "BaseInstance.h"
#include "BaseLauncher.h"
#include "launch/LaunchTask.h"
#include "java/JavaUtils.h"
#include "JavaCommon.h"
#include "InstancePageProvider.h"

View File

@ -7,11 +7,11 @@
#include <QScrollBar>
#include <QShortcut>
#include "BaseLauncher.h"
#include "launch/LaunchTask.h"
#include <settings/Setting.h>
#include "GuiUtil.h"
LogPage::LogPage(std::shared_ptr<BaseLauncher> proc, QWidget *parent)
LogPage::LogPage(std::shared_ptr<LaunchTask> proc, QWidget *parent)
: QWidget(parent), ui(new Ui::LogPage), m_process(proc)
{
ui->setupUi(this);

View File

@ -18,7 +18,7 @@
#include <QWidget>
#include "BaseInstance.h"
#include "BaseLauncher.h"
#include "launch/LaunchTask.h"
#include "BasePage.h"
#include <MultiMC.h>
@ -33,7 +33,7 @@ class LogPage : public QWidget, public BasePage
Q_OBJECT
public:
explicit LogPage(std::shared_ptr<BaseLauncher> proc, QWidget *parent = 0);
explicit LogPage(std::shared_ptr<LaunchTask> proc, QWidget *parent = 0);
virtual ~LogPage();
virtual QString displayName() const override
{
@ -77,7 +77,7 @@ private slots:
private:
Ui::LogPage *ui;
std::shared_ptr<BaseLauncher> m_process;
std::shared_ptr<LaunchTask> m_process;
int m_last_scroll_value = 0;
bool m_scroll_active = true;
int m_saved_offset = 0;