Fix qmltestrunner hang bug when no TestCase item
authorCharles Yin <charles.yin@nokia.com>
Mon, 24 Oct 2011 00:44:16 +0000 (10:44 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 24 Oct 2011 01:02:19 +0000 (03:02 +0200)
commitec0402116c20a2121619199a7fa34c61265d8acc
tree46cf07be5b8fc2259a60a808b03cfba80f81b5ff
parent19a520265317373754a158456fe3739dc8399bc5
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>
src/imports/testlib/TestCase.qml
src/qmltest/quicktest.cpp