diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-12 09:35:53 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-12 09:35:53 +0100 |
commit | ee595fb1daa3c09215e3063321301e6746733662 (patch) | |
tree | c4cee6d1c623d60bd51bc254649749824f36d539 /logic | |
parent | 997054a5351cd6187f578d2ac24df661027bf7cc (diff) | |
parent | fdc58bb91360c04eed13a4fd4f8323a6a467dc37 (diff) | |
download | PrismLauncher-ee595fb1daa3c09215e3063321301e6746733662.tar.gz PrismLauncher-ee595fb1daa3c09215e3063321301e6746733662.tar.bz2 PrismLauncher-ee595fb1daa3c09215e3063321301e6746733662.zip |
Merge branch 'develop'
Diffstat (limited to 'logic')
-rw-r--r-- | logic/MinecraftProcess.cpp | 23 | ||||
-rw-r--r-- | logic/MinecraftProcess.h | 2 |
2 files changed, 15 insertions, 10 deletions
diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp index ff122628..6c86c73a 100644 --- a/logic/MinecraftProcess.cpp +++ b/logic/MinecraftProcess.cpp @@ -111,19 +111,24 @@ void MinecraftProcess::on_stdOut() // exit handler void MinecraftProcess::finish(int code, ExitStatus status) { - if (status != NormalExit) + if (!killed) { - // TODO: error handling + if (status == NormalExit) + { + //: Message displayed on instance exit + emit log(tr("Minecraft exited with exitcode %1.").arg(code)); + } + else + { + //: Message displayed on instance crashed + emit log(tr("Minecraft crashed with exitcode %1.").arg(code)); + } } - - // TODO: Localization - - if (!killed) - //: Message displayed on instance exit - emit log(tr("Minecraft exited with exitcode %1.").arg(status)); else + { //: Message displayed after the instance exits due to kill request emit log(tr("Minecraft was killed by user."), MessageLevel::Error); + } m_prepostlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(code)); @@ -138,7 +143,7 @@ void MinecraftProcess::finish(int code, ExitStatus status) } } m_instance->cleanupAfterRun(); - emit ended(m_instance); + emit ended(m_instance, code, status); } void MinecraftProcess::killMinecraft() diff --git a/logic/MinecraftProcess.h b/logic/MinecraftProcess.h index ad887c5b..2a61e172 100644 --- a/logic/MinecraftProcess.h +++ b/logic/MinecraftProcess.h @@ -74,7 +74,7 @@ signals: /** * @brief emitted when mc has finished and the PostLaunchCommand was run */ - void ended(BaseInstance *); + void ended(BaseInstance *, int code, ExitStatus status); /** * @brief emitted when we want to log something |