summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-11 22:21:37 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-30 07:16:20 +0200
commit34ddfc7ecc2b0450b3d501e65cb4203ac747ed42 (patch)
treec53d32ac89aa996347901ea64f25909231a75895 /application
parentd14a61b0df38d150e1449b19b7eee411e91e5211 (diff)
downloadMultiMC-34ddfc7ecc2b0450b3d501e65cb4203ac747ed42.tar
MultiMC-34ddfc7ecc2b0450b3d501e65cb4203ac747ed42.tar.gz
MultiMC-34ddfc7ecc2b0450b3d501e65cb4203ac747ed42.tar.lz
MultiMC-34ddfc7ecc2b0450b3d501e65cb4203ac747ed42.tar.xz
MultiMC-34ddfc7ecc2b0450b3d501e65cb4203ac747ed42.zip
GH-1053 base process and launch refactor, part 1
Diffstat (limited to 'application')
-rw-r--r--application/ConsoleWindow.cpp2
-rw-r--r--application/ConsoleWindow.h8
-rw-r--r--application/MainWindow.cpp4
-rw-r--r--application/MainWindow.h4
-rw-r--r--application/pages/LogPage.cpp13
-rw-r--r--application/pages/LogPage.h6
6 files changed, 16 insertions, 21 deletions
diff --git a/application/ConsoleWindow.cpp b/application/ConsoleWindow.cpp
index a96d84a1..6a3cd6b2 100644
--- a/application/ConsoleWindow.cpp
+++ b/application/ConsoleWindow.cpp
@@ -53,7 +53,7 @@ private:
BasePage * m_log_page;
};
-ConsoleWindow::ConsoleWindow(BaseProcess *process, QWidget *parent)
+ConsoleWindow::ConsoleWindow(BaseLauncher *process, QWidget *parent)
: QMainWindow(parent), m_proc(process)
{
MultiMCPlatform::fixWM_CLASS(this);
diff --git a/application/ConsoleWindow.h b/application/ConsoleWindow.h
index 6e3849c5..a5e9c3a4 100644
--- a/application/ConsoleWindow.h
+++ b/application/ConsoleWindow.h
@@ -17,7 +17,7 @@
#include <QMainWindow>
#include <QSystemTrayIcon>
-#include "BaseProcess.h"
+#include "BaseLauncher.h"
class QPushButton;
class PageContainer;
@@ -26,7 +26,7 @@ class ConsoleWindow : public QMainWindow
Q_OBJECT
public:
- explicit ConsoleWindow(BaseProcess *proc, QWidget *parent = 0);
+ explicit ConsoleWindow(BaseLauncher *proc, QWidget *parent = 0);
virtual ~ConsoleWindow();
/**
@@ -47,7 +47,7 @@ slots:
void onEnded(InstancePtr instance, int code, QProcess::ExitStatus status);
void onLaunchFailed(InstancePtr instance);
- // FIXME: add handlers for the other MinecraftProcess signals (pre/post launch command
+ // FIXME: add handlers for the other MinecraftLauncher signals (pre/post launch command
// failures)
void iconActivated(QSystemTrayIcon::ActivationReason);
@@ -56,7 +56,7 @@ protected:
void closeEvent(QCloseEvent *);
private:
- BaseProcess *m_proc = nullptr;
+ BaseLauncher *m_proc = nullptr;
bool m_mayclose = true;
QSystemTrayIcon *m_trayIcon = nullptr;
PageContainer *m_container = nullptr;
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index c595f95f..8e43ff0e 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -378,7 +378,7 @@ namespace Ui {
#include "Env.h"
#include "BaseInstance.h"
-#include "BaseProcess.h"
+#include "BaseLauncher.h"
#include "java/JavaUtils.h"
#include "JavaCommon.h"
#include "InstancePageProvider.h"
@@ -1744,7 +1744,7 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session,
return;
}
- BaseProcess *proc = instance->prepareForLaunch(session);
+ BaseLauncher *proc = instance->prepareForLaunch(session);
if (!proc)
return;
diff --git a/application/MainWindow.h b/application/MainWindow.h
index 33a5a4ed..010db55c 100644
--- a/application/MainWindow.h
+++ b/application/MainWindow.h
@@ -30,7 +30,7 @@ class QToolButton;
class InstanceProxyModel;
class LabeledToolButton;
class QLabel;
-class MinecraftProcess;
+class MinecraftLauncher;
class ConsoleWindow;
class BaseProfilerFactory;
class GenericPageProvider;
@@ -196,7 +196,7 @@ private:
class GroupView *view;
InstanceProxyModel *proxymodel;
NetJobPtr skin_download_job;
- MinecraftProcess *proc;
+ MinecraftLauncher *proc;
ConsoleWindow *console;
LabeledToolButton *renameButton;
QToolButton *changeIconButton;
diff --git a/application/pages/LogPage.cpp b/application/pages/LogPage.cpp
index 3fade26f..0b88193c 100644
--- a/application/pages/LogPage.cpp
+++ b/application/pages/LogPage.cpp
@@ -7,11 +7,11 @@
#include <QScrollBar>
#include <QShortcut>
-#include "BaseProcess.h"
+#include "BaseLauncher.h"
#include <settings/Setting.h>
#include "GuiUtil.h"
-LogPage::LogPage(BaseProcess *proc, QWidget *parent)
+LogPage::LogPage(BaseLauncher *proc, QWidget *parent)
: QWidget(parent), ui(new Ui::LogPage), m_process(proc)
{
ui->setupUi(this);
@@ -148,14 +148,14 @@ void LogPage::write(QString data, MessageLevel::Enum mode)
{
if (!m_write_active)
{
- if (mode != MessageLevel::PrePost && mode != MessageLevel::MultiMC)
+ if (mode != MessageLevel::MultiMC)
{
return;
}
}
if(m_stopOnOverflow && m_write_active)
{
- if(mode != MessageLevel::PrePost && mode != MessageLevel::MultiMC)
+ if(mode != MessageLevel::MultiMC)
{
if(ui->text->blockCount() >= ui->text->maximumBlockCount())
{
@@ -231,11 +231,6 @@ void LogPage::write(QString data, MessageLevel::Enum mode)
format.setBackground(QColor("black"));
break;
}
- case MessageLevel::PrePost:
- {
- format.setForeground(QColor("grey"));
- break;
- }
case MessageLevel::Info:
case MessageLevel::Message:
default:
diff --git a/application/pages/LogPage.h b/application/pages/LogPage.h
index 0cbf3d23..a420a75f 100644
--- a/application/pages/LogPage.h
+++ b/application/pages/LogPage.h
@@ -18,7 +18,7 @@
#include <QWidget>
#include "BaseInstance.h"
-#include "BaseProcess.h"
+#include "BaseLauncher.h"
#include "BasePage.h"
#include <MultiMC.h>
@@ -33,7 +33,7 @@ class LogPage : public QWidget, public BasePage
Q_OBJECT
public:
- explicit LogPage(BaseProcess *proc, QWidget *parent = 0);
+ explicit LogPage(BaseLauncher *proc, QWidget *parent = 0);
virtual ~LogPage();
virtual QString displayName() const override
{
@@ -77,7 +77,7 @@ private slots:
private:
Ui::LogPage *ui;
- BaseProcess *m_process;
+ BaseLauncher *m_process;
int m_last_scroll_value = 0;
bool m_scroll_active = true;
int m_saved_offset = 0;