summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
commit2790cb59f6877c1027c833578b72e168c912758a (patch)
treeb626316b5801ba887b48e9fe71f811f4cf4ec581 /demos/declarative/samegame
parentf800919c4336da77b73561cc5180fc167f61f435 (diff)
downloadQt-2790cb59f6877c1027c833578b72e168c912758a.zip
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.gz
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.bz2
Make "on" syntax mandatory for value sources and interceptors
Where you would have written x: NumberAnimation {} y: Behavior {} you now must write NumberAnimation on x {} Behavior on y {} This change also makes the parser more strict with respect to multiple assignments to a single property - they're no longer allowed. For example this x: 10 x: 11 is now an error.
Diffstat (limited to 'demos/declarative/samegame')
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml6
-rw-r--r--demos/declarative/samegame/content/Dialog.qml2
-rw-r--r--demos/declarative/samegame/samegame.qml2
3 files changed, 5 insertions, 5 deletions
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index 723e62a..e48194a 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -7,8 +7,8 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
- y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
+ SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
Image { id: img
source: {
@@ -21,7 +21,7 @@ Item { id:block
}
}
opacity: 0
- opacity: Behavior { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: 200 } }
anchors.fill: parent
}
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml
index 7769328..6d5d6b5 100644
--- a/demos/declarative/samegame/content/Dialog.qml
+++ b/demos/declarative/samegame/content/Dialog.qml
@@ -14,7 +14,7 @@ Rectangle {
property Item text: myText
color: "white"; border.width: 1; width: myText.width + 20; height: myText.height + 40;
opacity: 0
- opacity: Behavior {
+ Behavior on opacity {
NumberAnimation { duration: 1000 }
}
Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 50f6293..c81f292 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -39,7 +39,7 @@ Rectangle {
Dialog {
id: scoreName; anchors.centerIn: parent; z: 22;
property int initialWidth: 0
- width: Behavior{NumberAnimation{} enabled: initialWidth!=0}
+ Behavior on width {NumberAnimation{} enabled: initialWidth!=0}
Text {
id: spacer
anchors.left: scoreName.left