mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
UI: Use sendPostedEvents with deleteLater events on destroy
On destruction of the window, send remaining QEvent::DeferredDelete events just to ensure there are no lingering actions remaining in the queue. May cause additional events to be posted, which should be covered by the final sendPostedEvents call. (Jim note: I admit this is probably unnecessary, and this may be redundant, but the reason such redundant precaution is being taken is because we want to make sure that browser panels in particular are properly cleaned up. To be quite frank I'm adding this mostly out of paranoia.)
This commit is contained in:
@@ -2555,6 +2555,7 @@ OBSBasic::~OBSBasic()
|
||||
{
|
||||
/* clear out UI event queue */
|
||||
QApplication::sendPostedEvents(nullptr);
|
||||
QApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
|
||||
|
||||
if (updateCheckThread && updateCheckThread->isRunning())
|
||||
updateCheckThread->wait();
|
||||
|
||||
Reference in New Issue
Block a user