1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

handle shutdown of OpenMW processes when shutting down OpenCS

This commit is contained in:
Marc Zinnschlag 2014-09-03 20:06:49 +02:00
parent 3fec253409
commit 431abcb63a
2 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,16 @@ CSMDoc::Runner::Runner() : mRunning (false)
this, SLOT (finished (int, QProcess::ExitStatus)));
}
CSMDoc::Runner::~Runner()
{
if (mRunning)
{
disconnect (&mProcess, 0, this, 0);
mProcess.kill();
mProcess.waitForFinished();
}
}
void CSMDoc::Runner::start (bool delayed)
{
if (!delayed)

View File

@ -17,6 +17,8 @@ namespace CSMDoc
Runner();
~Runner();
/// \param delayed Flag as running but do not start the OpenMW process yet (the
/// process must be started by another call of start with delayed==false)
void start (bool delayed = false);