From 3a173648e789f30b2843241ee38e694d16e10358 Mon Sep 17 00:00:00 2001 From: Orochimarufan Date: Fri, 22 Feb 2013 18:18:23 +0100 Subject: Implement ConsoleWindow --- main.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 4f072b38..5cac6ab0 100644 --- a/main.cpp +++ b/main.cpp @@ -24,6 +24,7 @@ #include "gui/mainwindow.h" #include "gui/logindialog.h" #include "gui/taskdialog.h" +#include "gui/consolewindow.h" #include "instancelist.h" #include "appsettings.h" @@ -49,6 +50,7 @@ private: QString instId; InstancePtr instance; MinecraftProcess *proc; + ConsoleWindow *console; public: InstanceLauncher(QString instId) : QObject(), instances(settings->getInstanceDir()) { @@ -82,15 +84,12 @@ private slots: void onLoginComplete(LoginResponse response) { // TODO: console - proc = new MinecraftProcess(instance, response.getUsername(), response.getSessionID(), nullptr); + console = new ConsoleWindow(); + proc = new MinecraftProcess(instance, response.getUsername(), response.getSessionID(), console); + //if (instance->getShowConsole()) + console->show(); connect(proc, SIGNAL(ended()), SLOT(onTerminated())); proc->launch(); - /*if (proc->pid() == 0) - { - std::cout << "Could not start instance." << std::endl; - QApplication::instance()->quit(); - return; - }*/ } void doLogin(const QString &errorMsg) -- cgit v1.2.3