From 7fe2b4a4d9b2c082d08c9380bbcce46ed7527585 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Wed, 10 Apr 2013 11:32:10 +0200 Subject: Testlib: Fix qml objects not deleted in TestCase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After destroy() been called in the test function. wait(0) is used to call processEvents(). Task-number: QTBUG-30523 Change-Id: I208f213e2de6b530dd0965b301d046aee0182d9b Reviewed-by: Jan Arve Sæther --- src/imports/testlib/TestCase.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/imports') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index fbfad28209..5484d5a96b 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -682,6 +682,9 @@ Item { qtest_runFunction(prop, null, isBenchmark) } qtest_results.finishTestFunction() + // wait(0) will call processEvents() so objects marked for deletion + // in the test function will be deleted. + wait(0) qtest_results.skipped = false } -- cgit v1.2.3