mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Invoke QCoreApplication::quit in queued connection
Instead of calling App()->quit() directly, which may shut down the event loop prematurely, invoke it and put it in the event queue so other events can be processed first. Again, this may be redundant, but we want to make sure any remaining events are taken care of before the main window gets completely destroyed, and before the program shuts down. This should help ensure that. Plus it also says you're supposed to do it this way in the documentation rather than call it correctly so uh... yea. Probably should have done this sooner.
This commit is contained in:
parent
8bff191b32
commit
1dbc6c177a
|
@ -4672,7 +4672,7 @@ void OBSBasic::closeEvent(QCloseEvent *event)
|
|||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_EXIT);
|
||||
|
||||
App()->quit();
|
||||
QMetaObject::invokeMethod(App(), "quit", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void OBSBasic::changeEvent(QEvent *event)
|
||||
|
|
Loading…
Reference in a new issue