From d879a932cc944e90afebaf96fde36746ec2ebe7e Mon Sep 17 00:00:00 2001 From: Benno Eigenmann Date: Wed, 29 Jul 2015 09:08:24 +0200 Subject: [PATCH] Ubuntu 15.04: thread->wait() hangs on Program Exit in GAudioOutput destructor --- src/GAudioOutput.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index 2e48dbc16..9725a54c4 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -56,16 +56,14 @@ GAudioOutput::GAudioOutput(QObject *parent) : worker->moveToThread(thread); connect(this, &GAudioOutput::textToSpeak, worker, &QGCAudioWorker::say); connect(this, &GAudioOutput::beepOnce, worker, &QGCAudioWorker::beep); + connect(thread, &QThread::finished, thread, &QObject::deleteLater); + connect(thread, &QThread::finished, worker, &QObject::deleteLater); thread->start(); } GAudioOutput::~GAudioOutput() { thread->quit(); - thread->wait(); - - delete worker; - delete thread; } -- 2.22.0