From 791221e923586bb717396ecf18bd13e57034df99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 27 Jan 2015 22:31:07 +0100 Subject: NOISSUE Refactors and moving of things --- gui/ConsoleWindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gui/ConsoleWindow.cpp') diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index 4ee0d487..ad3c2636 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -52,8 +52,8 @@ private: BasePage * m_log_page; }; -ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) - : QMainWindow(parent), m_proc(mcproc) +ConsoleWindow::ConsoleWindow(BaseProcess *process, QWidget *parent) + : QMainWindow(parent), m_proc(process) { MultiMCPlatform::fixWM_CLASS(this); setAttribute(Qt::WA_DeleteOnClose); @@ -120,23 +120,23 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) { m_trayIcon = new QSystemTrayIcon(icon, this); m_trayIcon->setToolTip(windowTitle); - + connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(iconActivated(QSystemTrayIcon::ActivationReason))); m_trayIcon->show(); } // Set up signal connections - connect(mcproc, SIGNAL(ended(InstancePtr, int, QProcess::ExitStatus)), this, + connect(m_proc, SIGNAL(ended(InstancePtr, int, QProcess::ExitStatus)), this, SLOT(onEnded(InstancePtr, int, QProcess::ExitStatus))); - connect(mcproc, SIGNAL(prelaunch_failed(InstancePtr, int, QProcess::ExitStatus)), this, + connect(m_proc, SIGNAL(prelaunch_failed(InstancePtr, int, QProcess::ExitStatus)), this, SLOT(onEnded(InstancePtr, int, QProcess::ExitStatus))); - connect(mcproc, SIGNAL(launch_failed(InstancePtr)), this, + connect(m_proc, SIGNAL(launch_failed(InstancePtr)), this, SLOT(onLaunchFailed(InstancePtr))); setMayClose(false); - if (mcproc->instance()->settings().get("ShowConsole").toBool()) + if (m_proc->instance()->settings().get("ShowConsole").toBool()) { show(); } @@ -213,7 +213,7 @@ void ConsoleWindow::on_btnKillMinecraft_clicked() "is frozen for some reason"), QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec(); if (response == QMessageBox::Yes) - m_proc->killMinecraft(); + m_proc->killProcess(); else m_killButton->setEnabled(true); } @@ -254,5 +254,5 @@ void ConsoleWindow::onLaunchFailed(InstancePtr instance) } ConsoleWindow::~ConsoleWindow() { - + } -- cgit v1.2.3