Don't run the event loop after QGuiApplication begins to tear down
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Oxide |
Fix Released
|
Medium
|
Chris Coulson | ||
1.18 |
Fix Released
|
Medium
|
Chris Coulson |
Bug Description
When initializing Oxide, we register a callback with qAddPostRoutine to run shutdown tasks. As part of this, we spin the event loop whilst waiting for pending unload handlers to finish (unload handlers run after a WebView is destroyed, so there's no way for an application to delay quitting for this).
The QApplication destructor runs these callbacks before it does anything else, which is great for applications that use it. However, the QGuiApplication destructor doesn't attempt to run them at all. This means that for applications using QGuiApplication, the shutdown callback won't execute until the QCoreApplication destructor begins (and QGuiApplication has been torn down).
This is bad, because we could run tasks that call in to QGuiApplication for things that have already gone (eg, QGuiApplication
We need to find another way of doing this....
Changed in oxide: | |
importance: | Undecided → Medium |
status: | New → Triaged |
I wonder if that could explain bug #1435465 ? (although webbrowser-app and webapp-container inherit QApplication, not QGuiApplication)