mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 01:06:41 +00:00
handle shutdown of OpenMW processes when shutting down OpenCS
This commit is contained in:
parent
3fec253409
commit
431abcb63a
2 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue