aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-10-25 09:40:37 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-25 04:17:36 +0200
commitcae9402e7bda876e83aa0d5ef4ba0f4ee0d0eca0 (patch)
tree482cd5700cd1033f736ef5e94d37f09d375af2e5 /src/imports/testlib
parent595873298b2f2946564eae6bfa78a69fbedaf968 (diff)
Remove warning messages from TestCase.qml
qtest_run should be called only when the whole TestCase is completely loaded. Task-number:QTBUG-22299 Change-Id: Id2874ed2493ccea72a4f17e6cb61aeb58ae4fa31 Reviewed-by: Charles Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/imports/testlib')
-rw-r--r--src/imports/testlib/TestCase.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index bb97481102..5887ececa0 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -74,6 +74,7 @@ Item {
// Internal private state. Identifiers prefixed with qtest are reserved.
property bool qtest_prevWhen: true
property int qtest_testId: -1
+ property bool qtest_componentCompleted : false
property variant qtest_testCaseResult
property variant qtest_results: qtest_results_normal
TestResult { id: qtest_results_normal }
@@ -659,7 +660,7 @@ Item {
onWhenChanged: {
if (when != qtest_prevWhen) {
qtest_prevWhen = when
- if (when && !completed && !running)
+ if (when && !completed && !running && qtest_componentCompleted)
qtest_run()
}
}
@@ -685,6 +686,7 @@ Item {
Component.onCompleted: {
qtest.hasTestCase = true;
+ qtest_componentCompleted = true;
if (util.printAvailableFunctions) {
var testList = []
@@ -714,4 +716,4 @@ Item {
if (when && !completed && !running)
qtest_run()
}
-}
+} \ No newline at end of file