aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qdeclarativeanimations/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick2/qdeclarativeanimations/data')
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml34
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml21
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badproperty2.qml21
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badtype1.qml12
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml12
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml12
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml27
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml30
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml18
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml19
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml19
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml24
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml8
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml25
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml25
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml30
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml27
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml26
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml27
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml13
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml11
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml41
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml17
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml7
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml29
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml18
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml48
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml30
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml12
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml14
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml14
43 files changed, 929 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml
new file mode 100644
index 0000000000..99ffca1d62
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/Double.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: container
+ property bool on: false
+ border.color: "#ffffff"
+ color: "green"
+ width: 50
+ height: 50
+ NumberAnimation on x {
+ objectName: "animation"
+ running: container.on; from: 0; to: 600; loops: Animation.Infinite; duration: 2000
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml
new file mode 100644
index 0000000000..9dcfcd8752
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/attached.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 180; height: 200;
+
+ Component {
+ id: delegate
+ Rectangle {
+ id: wrapper
+ width: 180; height: 200
+ color: "blue"
+
+ states: State {
+ name: "otherState"
+ PropertyChanges { target: wrapper; color: "green" }
+ }
+
+ transitions: Transition {
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
+ ScriptAction { script: console.log(wrapper.ListView.delayRemove ? "on" : "off") }
+ }
+
+ Component.onCompleted: {
+ console.log(ListView.delayRemove ? "on" : "off");
+ wrapper.state = "otherState"
+ }
+ }
+ }
+
+ ListView {
+ model: 1
+ delegate: delegate
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml
new file mode 100644
index 0000000000..9634c2c169
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty1.qml
@@ -0,0 +1,21 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ 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/qtquick2/qdeclarativeanimations/data/badproperty2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty2.qml
new file mode 100644
index 0000000000..c121172a99
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badproperty2.qml
@@ -0,0 +1,21 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ 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/qtquick2/qdeclarativeanimations/data/badtype1.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype1.qml
new file mode 100644
index 0000000000..43e1ec8572
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype1.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ PropertyAnimation on x { from: "blue"; to: "green"; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml
new file mode 100644
index 0000000000..5341cb3d1c
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype2.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { from: "blue"; to: "green"; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml
new file mode 100644
index 0000000000..182efa0840
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype3.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ ColorAnimation on color { from: 10; to: 15; }
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml
new file mode 100644
index 0000000000..f091e2430f
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/badtype4.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; color: "blue" }
+ }
+ transitions: Transition {
+ //comment out each in turn to make sure each only animates the relevant property
+ ColorAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ NumberAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml
new file mode 100644
index 0000000000..0fbafead8b
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/disabledTransition.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ enabled: false
+ NumberAnimation { targets: theRect; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml
new file mode 100644
index 0000000000..c0c0c65e3f
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/dontAutoStart.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ Behavior on x {
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; loops: Animation.Infinite}
+ }
+
+ }
+
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml
new file mode 100644
index 0000000000..3eee0cfd35
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart.qml
@@ -0,0 +1,19 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ SequentialAnimation on x {
+ running: false
+ NumberAnimation { objectName: "MyAnim"; running: true }
+ }
+
+ }
+
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml
new file mode 100644
index 0000000000..e7b4164e4e
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/dontStart2.qml
@@ -0,0 +1,19 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+
+ transitions: Transition {
+ SequentialAnimation {
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; running: true }
+ }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml
new file mode 100644
index 0000000000..e0e46dcef5
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/dotproperty.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ transitions: Transition {
+ ColorAnimation { properties: "border.color"; duration: 1000 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml
new file mode 100644
index 0000000000..9ef3da20c0
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/doubleRegistrationBug.qml
@@ -0,0 +1,8 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400; height: 400
+
+ Double { id: dub; on: parent.width < 800 }
+ Component.onCompleted: dub.on = false
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml
new file mode 100644
index 0000000000..76129dd15e
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype1.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; border.width: 10 }
+ }
+ transitions: Transition {
+ PropertyAnimation { properties: "x,border.width"; duration: 1000 } //x is real, border.width is int
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml
new file mode 100644
index 0000000000..1a7166e3f3
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/mixedtype2.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; color: "blue" }
+ }
+ transitions: Transition {
+ PropertyAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml
new file mode 100644
index 0000000000..909c533e7b
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/nonTransitionBug.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+ width: 200
+ height: 200
+
+ Rectangle {
+ id: mover
+ objectName: "mover"
+ }
+
+ states: [
+ State {
+ name: "free"
+ },
+ State {
+ name: "left"
+ PropertyChanges {
+ restoreEntryValues: false
+ target: mover
+ x: 0
+ }
+ }
+ ]
+
+ transitions: Transition {
+ PropertyAnimation { properties: "x"; duration: 50 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml
new file mode 100644
index 0000000000..d2006a1c6a
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+
+ Rectangle {
+ id: redRect
+ color: "red"
+ width: 100; height: 100
+ x: 50; y: 50
+ }
+
+ PathAnimation {
+ target: redRect
+ duration: 100;
+ path: Path {
+ startX: 50; startY: 50
+ PathCubic {
+ x: 300; y: 300
+
+ control1X: 300; control1Y: 50
+ control2X: 50; control2Y: 300
+ }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml
new file mode 100644
index 0000000000..951c5b2e57
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimation2.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+
+ Rectangle {
+ id: redRect
+ color: "red"
+ width: 100; height: 100
+ x: 50; y: 50
+ }
+
+ PathAnimation {
+ target: redRect
+ duration: 100;
+ endRotation: 0
+ orientationEntryInterval: .1
+ orientationExitInterval: .1
+ orientation: PathAnimation.RightFirst
+ path: Path {
+ startX: 50; startY: 50
+ PathLine { x: 300; y: 300 }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml
new file mode 100644
index 0000000000..be3501fabb
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathAnimationNoStart.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+
+ Rectangle {
+ id: redRect
+ color: "red"
+ width: 100; height: 100
+ x: 50; y: 50
+ }
+
+ PathAnimation {
+ target: redRect
+ duration: 100;
+ path: Path {
+ //no startX/Y defined (should automatically start from redRects pos)
+ PathCubic {
+ x: 300; y: 300
+
+ control1X: 300; control1Y: 50
+ control2X: 50; control2Y: 300
+ }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml
new file mode 100644
index 0000000000..0104412d7c
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolator.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+PathInterpolator {
+ path: Path {
+ startX: 50; startY: 50
+ PathCubic {
+ x: 300; y: 300
+
+ control1X: 300; control1Y: 50
+ control2X: 50; control2Y: 300
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml
new file mode 100644
index 0000000000..41366ef798
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathInterpolatorBack.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.0
+
+PathInterpolator {
+ path: Path {
+ startX: 50; startY: 50
+ PathLine { x: 50; y: 100 }
+ PathLine { x: 100; y: 100 }
+ PathLine { x: 100; y: 50 }
+ PathLine { x: 200; y: 50 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml
new file mode 100644
index 0000000000..55ffc33f95
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pathTransition.qml
@@ -0,0 +1,41 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 800
+ height: 800
+
+ Rectangle {
+ id: redRect; objectName: "redRect"
+ color: "red"
+ width: 50; height: 50
+ x: 500; y: 50
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: redRect
+ x: 100; y: 700
+ }
+ }
+
+ transitions: Transition {
+ to: "moved"; reversible: true
+ PathAnimation {
+ id: pathAnim
+ target: redRect
+ duration: 300
+ path: Path {
+ PathCurve { x: 100; y: 100 }
+ PathCurve { x: 200; y: 350 }
+ PathCurve { x: 600; y: 500 }
+ PathCurve {}
+ }
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = parent.state == "moved" ? "" : "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml
new file mode 100644
index 0000000000..359cda166f
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBindingBug.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: rect
+ width: 200
+ height: 200
+
+ property bool animating: false
+ property int value: 0
+
+ NumberAnimation on value {
+ objectName: "animation"
+ paused: !rect.animating
+ to: 100
+ duration: 50
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml
new file mode 100644
index 0000000000..fa2c4be4ba
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/pauseBug.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+
+SequentialAnimation {
+ id: animation
+ running: true
+ ScriptAction { script: animation.paused = true }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml
new file mode 100644
index 0000000000..f0f730967c
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/properties.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { to: 200 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml
new file mode 100644
index 0000000000..6b7f026e0b
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/properties2.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { targets: theRect; properties: "x"; to: 200; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml
new file mode 100644
index 0000000000..5eb65496d4
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/properties3.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { target: theRect; property: "x"; to: 300; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml
new file mode 100644
index 0000000000..dfe8ad17e7
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/properties4.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { target: theRect; property: "y"; to: 200; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml
new file mode 100644
index 0000000000..075fc9bc5a
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/properties5.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { targets: theRect; properties: "y"; to: 200; }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml
new file mode 100644
index 0000000000..968c5f6285
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml
new file mode 100644
index 0000000000..f06165604a
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition2.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { target: theRect; property: "y"; to: 200 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml
new file mode 100644
index 0000000000..7d3b3b9c6d
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; properties: "y" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml
new file mode 100644
index 0000000000..1c31a79634
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition4.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { target: theRect; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml
new file mode 100644
index 0000000000..a2ff746900
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition5.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; property: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml
new file mode 100644
index 0000000000..d3db01efb0
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition6.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theItem; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml
new file mode 100644
index 0000000000..98898de8ef
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition7.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ SpringAnimation { targets: theRect; properties: "x"; velocity: 10000 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml
new file mode 100644
index 0000000000..633da4e17f
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/registrationBug.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: rect
+ width: 200
+ height: 200
+
+ property bool animating: true
+ property int value: 0
+
+ NumberAnimation {
+ target: rect
+ property: "value"
+ running: rect.animating
+ to: 100
+ duration: 50
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml
new file mode 100644
index 0000000000..4dc42a1bd2
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/rotation.qml
@@ -0,0 +1,48 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 600; height: 200
+
+ Row {
+ spacing: 5
+ Rectangle {
+ id: rr
+ objectName: "rr"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr2
+ objectName: "rr2"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr3
+ objectName: "rr3"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr4
+ objectName: "rr4"
+ color: "red"
+ width: 100; height: 100
+ }
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges { target: rr; rotation: 370 }
+ PropertyChanges { target: rr2; rotation: 370 }
+ PropertyChanges { target: rr3; rotation: 370 }
+ PropertyChanges { target: rr4; rotation: 370 }
+ }
+
+ transitions: Transition {
+ RotationAnimation { target: rr; direction: RotationAnimation.Numerical; duration: 1000 }
+ RotationAnimation { target: rr2; direction: RotationAnimation.Clockwise; duration: 1000 }
+ RotationAnimation { target: rr3; direction: RotationAnimation.Counterclockwise; duration: 1000 }
+ RotationAnimation { target: rr4; direction: RotationAnimation.Shortest; duration: 1000 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml
new file mode 100644
index 0000000000..bec6fab368
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/runningTrueBug.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+Rectangle {
+ color: "skyblue"
+ width: 500
+ height: 200
+ Rectangle {
+ objectName: "cloud"
+ color: "white"
+ y: 50
+ width: 100
+ height: 100
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ running: true
+ NumberAnimation {
+ id: firstAnimation
+ from: 0
+ to: 500
+ duration: 5000
+ }
+ NumberAnimation {
+ id: secondAnimation
+ from: -100
+ to: 0
+ duration: 1000
+ }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml
new file mode 100644
index 0000000000..508693e0fc
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/transitionAssignmentBug.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+
+ property bool nullObject
+ Component.onCompleted: nullObject = transitions.length > 0 && transitions[0] === null
+
+ property list<Transition> myTransitions: [Transition {}, Transition {}]
+ transitions: myTransitions
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml
new file mode 100644
index 0000000000..7a636b4003
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { id: anim; objectName: "MyAnim"; to: 200 }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml
new file mode 100644
index 0000000000..9788761ee8
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/valuesource2.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { id: anim; objectName: "MyAnim"; running: false; to: 200 }
+ }
+}