Fix the tst_qdeclarativedebug auto test.
authorRoberto Raggi <roberto.raggi@nokia.com>
Thu, 25 Aug 2011 07:21:28 +0000 (09:21 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
The creation order in QML is not defined.

Change-Id: I4bc3d9e56e32a0c907cdaef9994ae66c3869a4ea
Reviewed-on: http://codereview.qt.nokia.com/3800
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>

tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp

index 8ad5e31..b47579e 100644 (file)
@@ -1084,7 +1084,7 @@ void tst_QDeclarativeDebug::setBindingInStates()
 
 
     // change the binding
-    QDeclarativeDebugObjectReference state = obj.children()[0];
+    QDeclarativeDebugObjectReference state = obj.children()[1];
     QCOMPARE(state.className(), QString("State"));
     QVERIFY(state.children().count() > 0);
 
@@ -1168,7 +1168,7 @@ void tst_QDeclarativeDebug::queryObjectTree()
 
 
     // check state
-    QDeclarativeDebugObjectReference state = obj.children()[0];
+    QDeclarativeDebugObjectReference state = obj.children()[1];
     QCOMPARE(state.className(), QString("State"));
     QVERIFY(state.children().count() > 0);
 
@@ -1184,7 +1184,7 @@ void tst_QDeclarativeDebug::queryObjectTree()
 
 
     // check transition
-    QDeclarativeDebugObjectReference transition = obj.children()[1];
+    QDeclarativeDebugObjectReference transition = obj.children()[0];
     QCOMPARE(transition.className(), QString("Transition"));
     QCOMPARE(findProperty(transition.properties(),"from").value().toString(), QString("*"));
     QCOMPARE(findProperty(transition.properties(),"to").value(), findProperty(state.properties(),"name").value());