diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index a7a000a01e..3debfd4231 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -1366,10 +1366,11 @@ void tst_QApplication::testDeleteLaterProcessEvents2() // If you call deleteLater() on an object when there is no parent // event loop, and then enter an event loop, the object will get // deleted. + QEventLoop loop; object = new QObject; + connect(object, &QObject::destroyed, &loop, &QEventLoop::quit); p = object; object->deleteLater(); - QEventLoop loop; QTimer::singleShot(1000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY(!p); |