From 4cf890e6a556f546082e442a8f21178b195f39d6 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Tue, 7 May 2024 09:00:19 +0200 Subject: [PATCH] Don't call processEvents in cleanup --- CMakeLists.txt | 2 +- application_manager.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0477477..c8ef5b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(JlQML) cmake_minimum_required(VERSION 3.16.0) -set(JlQML_VERSION 0.6.0) +set(JlQML_VERSION 0.6.1) message(STATUS "Project version: v${JlQML_VERSION}") set(CMAKE_MACOSX_RPATH 1) diff --git a/application_manager.cpp b/application_manager.cpp index 2d9a870..7da4846 100644 --- a/application_manager.cpp +++ b/application_manager.cpp @@ -100,6 +100,8 @@ void ApplicationManager::exec() { qWarning() << "Application exited with status " << status; } + QGuiApplication::sendPostedEvents(); + QGuiApplication::processEvents(QEventLoop::AllEvents); cleanup(); } @@ -120,9 +122,6 @@ ApplicationManager::ApplicationManager() void ApplicationManager::cleanup() { - // Process any events that are left, avoiding e.g. an immediate exec on a potential next call to exit - QGuiApplication::sendPostedEvents(); - QGuiApplication::processEvents(QEventLoop::AllEvents); if(m_engine != nullptr) { delete m_engine;