diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-05-14 13:27:28 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 06:14:16 +0200 |
commit | 9b07fd0d5cae6846f0eaccf3dc51bc9e78559a05 (patch) | |
tree | a248572b50724dcd8b5cfe0f3f94edc81a8d0db8 /tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | |
parent | 00f88bd0902c852c334903d7437cb0f6e399471d (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<SendPostedEventsTester> 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); |