Skip to content

Commit

Permalink
Don't call processEvents in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
barche committed May 7, 2024
1 parent ad59983 commit 4cf890e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions application_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ void ApplicationManager::exec()
{
qWarning() << "Application exited with status " << status;
}
QGuiApplication::sendPostedEvents();
QGuiApplication::processEvents(QEventLoop::AllEvents);
cleanup();
}

Expand All @@ -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;
Expand Down

0 comments on commit 4cf890e

Please sign in to comment.