aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-10-24 10:44:16 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-24 03:02:19 +0200
commitec0402116c20a2121619199a7fa34c61265d8acc (patch)
tree46cf07be5b8fc2259a60a808b03cfba80f81b5ff /src/imports/testlib
parent19a520265317373754a158456fe3739dc8399bc5 (diff)
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 <michael.brasser@nokia.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/imports/testlib')
-rw-r--r--src/imports/testlib/TestCase.qml2
1 files changed, 2 insertions, 0 deletions
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) {