summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-14 00:44:56 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-14 00:44:56 (GMT)
commit6824699348235dbee41e5e8b70d789dbde7febcb (patch)
tree56c56c69e768177d6aa2059c0bd6324409651adc /tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
parentf4dc906af870b2ed0d1446bb223e70db31791e8b (diff)
parent0b521e1ece29dabea90463b13f655b7ab7ea3be2 (diff)
downloadQt-6824699348235dbee41e5e8b70d789dbde7febcb.zip
Qt-6824699348235dbee41e5e8b70d789dbde7febcb.tar.gz
Qt-6824699348235dbee41e5e8b70d789dbde7febcb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: In ParentChange treat flip in x and y as a 180 degree rotation
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 6ae2759..0621602 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -581,6 +581,21 @@ void tst_qdeclarativestates::parentChange()
//do a non-qFuzzyCompare fuzzy compare
QVERIFY(innerRect->y() < qreal(0.00001) && innerRect->y() > qreal(-0.00001));
}
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange6.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeItemPrivate::get(rect)->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(180));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(-105));
+ QCOMPARE(innerRect->y(), qreal(-105));
+ }
}
void tst_qdeclarativestates::parentChangeErrors()