From 0f8e3ce452f9a304eae07dcff4f4090d678502e1 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 1 Jun 2017 10:04:05 +0100 Subject: [PATCH] Send DeferredDelete events explicitly in our main event loop * It's not entirely clear if this is the intended fix, but otherwise since we're not running QApplication::exec() the main event loop has the same 'loop level' of 0 as the event level when it's fired. The proper functioning seems to be that the posted deleteLater event should have an event level of 1 which then means it will be processed when coming back to the exec() loop level of 0, but since we don't get that, just run it manually after all other events. --- qrenderdoc/Code/qrenderdoc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qrenderdoc/Code/qrenderdoc.cpp b/qrenderdoc/Code/qrenderdoc.cpp index 8c168c459..32fd81387 100644 --- a/qrenderdoc/Code/qrenderdoc.cpp +++ b/qrenderdoc/Code/qrenderdoc.cpp @@ -234,6 +234,7 @@ int main(int argc, char *argv[]) { application.processEvents(QEventLoop::WaitForMoreEvents); QCoreApplication::sendPostedEvents(); + QCoreApplication::sendPostedEvents(NULL, QEvent::DeferredDelete); } config.Save();