From b44e70d58dac92a21d905565370357d296942209 Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Fri, 6 Sep 2013 18:48:41 +0200 Subject: [PATCH] started kill instance feature --- logic/MinecraftProcess.cpp | 5 +++++ logic/MinecraftProcess.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp index d34be835f..3d82008b6 100644 --- a/logic/MinecraftProcess.cpp +++ b/logic/MinecraftProcess.cpp @@ -138,6 +138,11 @@ void MinecraftProcess::finish(int code, ExitStatus status) emit ended(); } +void MinecraftProcess::killMinecraft() +{ + killed = true; +} + void MinecraftProcess::launch() { if (!m_instance->settings().get("PreLaunchCommand").toString().isEmpty()) diff --git a/logic/MinecraftProcess.h b/logic/MinecraftProcess.h index 516bf9863..248ad807a 100644 --- a/logic/MinecraftProcess.h +++ b/logic/MinecraftProcess.h @@ -59,6 +59,8 @@ public: void setMinecraftArguments(QStringList args); + void killMinecraft(); + signals: /** * @brief emitted when mc has finished and the PostLaunchCommand was run @@ -83,4 +85,6 @@ protected slots: void finish(int, QProcess::ExitStatus status); void on_stdErr(); void on_stdOut(); +private: + bool killed; };