From ec0402116c20a2121619199a7fa34c61265d8acc Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Mon, 24 Oct 2011 10:44:16 +1000 Subject: Fix qmltestrunner hang bug when no TestCase item Add a hasTestCase property to the global qtest object, set it to true in each TestCase's onCompleted handler. qmltestrunner only enter the event loop if this property is true to avoid infinite waiting. Task-number:QTBUG-22281 Change-Id: Id609432210ae795d8c128901e64ba0aef4551f01 Reviewed-by: Michael Brasser Reviewed-by: Charles Yin --- src/imports/testlib/TestCase.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/imports/testlib') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 432f96ccf1..bb97481102 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -684,6 +684,8 @@ Item { } Component.onCompleted: { + qtest.hasTestCase = true; + if (util.printAvailableFunctions) { var testList = [] for (var prop in testCase) { -- cgit v1.2.3