mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-09 09: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)
|
||||
{
|
||||
proc->disconnect(this);
|
||||
|
||||
if(proc->state() != QProcess::NotRunning)
|
||||
proc->terminate();
|
||||
{
|
||||
// Before try to correct end proccess
|
||||
// Terminate if failed
|
||||
proc->close();
|
||||
bool finished = proc->waitForFinished(5000);
|
||||
if (!finished)
|
||||
proc->terminate();
|
||||
}
|
||||
|
||||
proc->setParent(0);
|
||||
#ifdef QPROC_SIGNAL_RELAY
|
||||
releaseAndDeleteLater(this, proc_relay);
|
||||
|
Loading…
x
Reference in New Issue
Block a user