summaryrefslogtreecommitdiffstats
path: root/libmultimc/src
diff options
context:
space:
mode:
authorOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:40:55 +0100
committerOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:40:55 +0100
commite4f86893a899ee86cfa6d238f891bec04977c966 (patch)
treecde559857f443d530930bce3f74eb6e64b500f52 /libmultimc/src
parentcd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e (diff)
downloadMultiMC-e4f86893a899ee86cfa6d238f891bec04977c966.tar
MultiMC-e4f86893a899ee86cfa6d238f891bec04977c966.tar.gz
MultiMC-e4f86893a899ee86cfa6d238f891bec04977c966.tar.lz
MultiMC-e4f86893a899ee86cfa6d238f891bec04977c966.tar.xz
MultiMC-e4f86893a899ee86cfa6d238f891bec04977c966.zip
fix merge issues, make console window work again
Diffstat (limited to 'libmultimc/src')
-rw-r--r--libmultimc/src/minecraftprocess.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/libmultimc/src/minecraftprocess.cpp b/libmultimc/src/minecraftprocess.cpp
index 3aecb1ee..e22a536c 100644
--- a/libmultimc/src/minecraftprocess.cpp
+++ b/libmultimc/src/minecraftprocess.cpp
@@ -125,22 +125,12 @@ MinecraftProcess::MinecraftProcess(InstancePtr inst, QString user, QString sessi
// console window
void MinecraftProcess::on_stdErr()
{
-// if (m_console != nullptr)
-// m_console->write(readAllStandardError(), ConsoleWindow::ERROR);
+ emit log(readAllStandardError(), MessageLevel::Error);
}
void MinecraftProcess::on_stdOut()
{
-// if (m_console != nullptr)
-// m_console->write(readAllStandardOutput(), ConsoleWindow::DEFAULT);
-}
-
-void MinecraftProcess::log(QString text)
-{
-// if (m_console != nullptr)
-// m_console->write(text);
-// else
- qDebug(qPrintable(text));
+ emit log(readAllStandardOutput(), MessageLevel::Message);
}
// exit handler
@@ -151,7 +141,7 @@ void MinecraftProcess::finish(int code, ExitStatus status)
//TODO: error handling
}
- log("Minecraft exited.");
+ emit log("Minecraft exited.");
m_prepostlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(code));
@@ -191,13 +181,13 @@ void MinecraftProcess::launch()
genArgs();
- log(QString("Minecraft folder is: '%1'").arg(workingDirectory()));
- log(QString("Instance launched with arguments: '%1'").arg(m_arguments.join("' '")));
+ emit log(QString("Minecraft folder is: '%1'").arg(workingDirectory()));
+ emit log(QString("Instance launched with arguments: '%1'").arg(m_arguments.join("' '")));
start(m_instance->settings().get("JavaPath").toString(), m_arguments);
if (!waitForStarted())
{
- log("Could not launch minecraft!", ConsoleWindow::ERROR);
+ emit log("Could not launch minecraft!");
return;
//TODO: error handling
}