From 9b07fd0d5cae6846f0eaccf3dc51bc9e78559a05 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 14 May 2012 13:27:28 +0200 Subject: Add QDeferredDeleteEvent Use this to store the loop-level counter needed by QCoreApplication when determining when it is safe to delete an object. This removes the hack to hijack the QEvent::d pointer (even though the pointer is unused). Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026 Reviewed-by: Thiago Macieira --- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/kernel/qapplication') diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index bed191df95..000eea8555 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -1045,7 +1045,7 @@ void SendPostedEventsTester::doTest() QPointer p = this; QApplication::postEvent(this, new QEvent(QEvent::User)); // DeferredDelete should not be delivered until returning from this function - QApplication::postEvent(this, new QEvent(QEvent::DeferredDelete)); + QApplication::postEvent(this, new QDeferredDeleteEvent()); QEventLoop eventLoop; QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection); -- cgit v1.2.3