mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-13 19:19:33 +00:00
qca-gnupg: correct way to reset gpg proccess
This commit is contained in:
parent
de02538aaf
commit
47fc70af6e
@ -188,8 +188,17 @@ public:
|
|||||||
if(proc)
|
if(proc)
|
||||||
{
|
{
|
||||||
proc->disconnect(this);
|
proc->disconnect(this);
|
||||||
|
|
||||||
if(proc->state() != QProcess::NotRunning)
|
if(proc->state() != QProcess::NotRunning)
|
||||||
|
{
|
||||||
|
// Before try to correct end proccess
|
||||||
|
// Terminate if failed
|
||||||
|
proc->close();
|
||||||
|
bool finished = proc->waitForFinished(5000);
|
||||||
|
if (!finished)
|
||||||
proc->terminate();
|
proc->terminate();
|
||||||
|
}
|
||||||
|
|
||||||
proc->setParent(0);
|
proc->setParent(0);
|
||||||
#ifdef QPROC_SIGNAL_RELAY
|
#ifdef QPROC_SIGNAL_RELAY
|
||||||
releaseAndDeleteLater(this, proc_relay);
|
releaseAndDeleteLater(this, proc_relay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user