summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/MainFrm.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-13 15:23:04 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-15 08:07:04 +0000
commit39643d7cb479b0496b62950a82a210f9ca255d61 (patch)
treec3bb5a4a66df650ffc8a79485e76b566ccd019a1 /src/Authoring/Studio/MainFrm.cpp
parenta0e0fc6736499957b5833af57b04aa6fa13bd6a9 (diff)
Fix editor crash at shutdown
When building against Qt 5.11.1, deleting the CMainFrame is apparently no longer doable while handling the CMainFrame::closeEvent, as it will queue a close event for the underlying QWindow. We need to perform shutdown asynchronously from the close event. Task-number: QT3DS-1922 Change-Id: I557d5788591ccc1359cf0d1a4ff35e153e2fe5a6 Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/MainFrm.cpp')
-rw-r--r--src/Authoring/Studio/MainFrm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Authoring/Studio/MainFrm.cpp b/src/Authoring/Studio/MainFrm.cpp
index d056bff7..bd9df0b5 100644
--- a/src/Authoring/Studio/MainFrm.cpp
+++ b/src/Authoring/Studio/MainFrm.cpp
@@ -809,7 +809,7 @@ void CMainFrame::closeEvent(QCloseEvent *event)
}
// Tell the app to shutdown, do it here so it does not rely on static destructor.
- g_StudioApp.performShutdown();
+ QTimer::singleShot(0, &g_StudioApp, &CStudioApp::performShutdown);
}
//==============================================================================