From ee81b5d895ad603232afc407c218ab5eb004679a Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 31 Mar 2020 13:23:14 +0300 Subject: [PATCH] QmlDesigner: Exit puppet asynchronously in case of failed icon render The application event loop is not yet active at setup time, so just calling qGuiApp->quit() directly doesn't actually exit the application. Change-Id: Iccae4dd59d92b593205c2057b189774f827ffcda Fixes: QDS-1875 Reviewed-by: Mahmoud Badri --- .../qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp index 034a809b16f..48830caee64 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp @@ -150,10 +150,10 @@ void IconRenderer::setupRender() QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit); }); } else { - qGuiApp->quit(); + QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit); } } else { - qGuiApp->quit(); + QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit); } }