diff options
Diffstat (limited to 'tests/auto/qapplication')
-rw-r--r-- | tests/auto/qapplication/tst_qapplication.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp index abcacef..97aa092 100644 --- a/tests/auto/qapplication/tst_qapplication.cpp +++ b/tests/auto/qapplication/tst_qapplication.cpp @@ -1242,6 +1242,10 @@ public slots: } void deleteLaterAndExitLoop() { + // Check that 'p' is not deleted before exec returns, since the call + // to QEventLoop::quit() should stop 'eventLoop' from processing + // any more events (that is, delete later) until we return to the + // _current_ event loop: QEventLoop eventLoop; QPointer<QObject> p(this); QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection); |