From 281f49f9230f101f96f7c0d796cb726c93a28981 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sun, 11 Jul 2021 17:55:42 +0200 Subject: [PATCH] WindowManager: wait for cleanup thread --- src/WindowManager.cpp | 6 ++++++ src/WindowManager.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/WindowManager.cpp b/src/WindowManager.cpp index cddd7e4..8eb203b 100644 --- a/src/WindowManager.cpp +++ b/src/WindowManager.cpp @@ -47,6 +47,12 @@ WindowManager::WindowManager() { } } +WindowManager::~WindowManager() { + qDebug() << "~WindowManager"; + m_cleanupThread->quit(); + m_cleanupThread->wait(); +} + // ######################## APPLICATION LIFECYCLE ######################## void WindowManager::quitAfterLastWindow() { diff --git a/src/WindowManager.h b/src/WindowManager.h index 801d537..bcba0a6 100644 --- a/src/WindowManager.h +++ b/src/WindowManager.h @@ -18,6 +18,7 @@ Q_OBJECT public: explicit WindowManager(); + ~WindowManager() override; void wizardOpenWallet(); void close();