summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/animations
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-01-14 07:40:30 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-01-14 07:40:30 (GMT)
commitde0a8ecadc072c0c3d7dd28af9ca544e48f3caed (patch)
treedb276e98f3010c07b40282fb62ba4f09346fa848 /tests/auto/declarative/animations
parentf8cf11f946a1637348509147f6b15d80ce1937b9 (diff)
downloadQt-de0a8ecadc072c0c3d7dd28af9ca544e48f3caed.zip
Qt-de0a8ecadc072c0c3d7dd28af9ca544e48f3caed.tar.gz
Qt-de0a8ecadc072c0c3d7dd28af9ca544e48f3caed.tar.bz2
fix test
(required clicking!)
Diffstat (limited to 'tests/auto/declarative/animations')
-rw-r--r--tests/auto/declarative/animations/data/badproperty1.qml5
-rw-r--r--tests/auto/declarative/animations/data/badproperty2.qml5
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp8
3 files changed, 8 insertions, 10 deletions
diff --git a/tests/auto/declarative/animations/data/badproperty1.qml b/tests/auto/declarative/animations/data/badproperty1.qml
index 6f31fe8..fda322c 100644
--- a/tests/auto/declarative/animations/data/badproperty1.qml
+++ b/tests/auto/declarative/animations/data/badproperty1.qml
@@ -9,10 +9,6 @@ Rectangle {
color: "red"
width: 50; height: 50
x: 100; y: 100
- MouseRegion {
- anchors.fill: parent
- onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1";
- }
}
states: State {
name: "state1"
@@ -21,4 +17,5 @@ Rectangle {
transitions: Transition {
ColorAnimation { target: MyRect; to: "red"; property: "border.colr"; duration: 1000 }
}
+ Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1";
}
diff --git a/tests/auto/declarative/animations/data/badproperty2.qml b/tests/auto/declarative/animations/data/badproperty2.qml
index c7d1673..0e8366a 100644
--- a/tests/auto/declarative/animations/data/badproperty2.qml
+++ b/tests/auto/declarative/animations/data/badproperty2.qml
@@ -9,10 +9,6 @@ Rectangle {
color: "red"
width: 50; height: 50
x: 100; y: 100
- MouseRegion {
- anchors.fill: parent
- onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1";
- }
}
states: State {
name: "state1"
@@ -21,4 +17,5 @@ Rectangle {
transitions: Transition {
ColorAnimation { target: MyRect; to: "red"; property: "border"; duration: 1000 }
}
+ Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1";
}
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index d9a81c4..588234c 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -297,12 +297,16 @@ void tst_animations::badProperties()
QmlEngine engine;
QmlComponent c1(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QML ColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"border.colr\"");
+ QByteArray message = "QML ColorAnimation (file://" SRCDIR "/data/badproperty1.qml:18:9) Cannot animate non-existant property \"border.colr\"";
+ QTest::ignoreMessage(QtWarningMsg, message);
+ QTest::ignoreMessage(QtWarningMsg, message); // why twice?
QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c1.create());
QVERIFY(rect);
QmlComponent c2(&engine, QUrl("file://" SRCDIR "/data/badproperty2.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QML ColorAnimation (file://" SRCDIR "/data/badproperty2.qml:22:9) Cannot animate read-only property \"border\"");
+ message = "QML ColorAnimation (file://" SRCDIR "/data/badproperty2.qml:18:9) Cannot animate read-only property \"border\"";
+ QTest::ignoreMessage(QtWarningMsg, message);
+ QTest::ignoreMessage(QtWarningMsg, message); // why twice?
rect = qobject_cast<QmlGraphicsRectangle*>(c2.create());
QVERIFY(rect);