From 871540a81b91bbe574f550a2df5cb2482627eba8 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther Date: Thu, 25 Jul 2019 18:23:19 +0200 Subject: [PATCH] Signal Hyperion::finished emits quit slot Signed-off-by: Paulchen-Panther --- libsrc/hyperion/Hyperion.cpp | 2 +- libsrc/hyperion/HyperionIManager.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 88a97f40..42a5e2b9 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -148,7 +148,7 @@ void Hyperion::start() void Hyperion::stop() { emit finished(); - thread()->quit(); + thread()->wait(); } void Hyperion::freeObjects(bool emitCloseSignal) diff --git a/libsrc/hyperion/HyperionIManager.cpp b/libsrc/hyperion/HyperionIManager.cpp index 22b0ee51..7c1b37d5 100644 --- a/libsrc/hyperion/HyperionIManager.cpp +++ b/libsrc/hyperion/HyperionIManager.cpp @@ -71,6 +71,7 @@ bool HyperionIManager::startInstance(const quint8& inst, const bool& block) connect(hyperionThread, &QThread::finished, hyperionThread, &QObject::deleteLater); connect(hyperion, &Hyperion::started, HyperionIManager::getInstance(), &HyperionIManager::handleStarted); connect(hyperion, &Hyperion::finished, HyperionIManager::getInstance(), &HyperionIManager::handleFinished); + connect(hyperion, &Hyperion::finished, hyperionThread, &QThread::quit, Qt::DirectConnection); // setup further connections // from Hyperion