diff options
Diffstat (limited to 'src/declarative/QmlChanges.txt')
-rw-r--r-- | src/declarative/QmlChanges.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 7c584b4d..2a35dda 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -10,6 +10,9 @@ Removed DateTimeFormatter (use Qt.formatDateTime() instead) Using WebView now requires "import org.webkit 1.0" Using Particles now requires "import Qt.labs.particles 1.0" AnchorAnimation must now be used to animate anchor changes (and not NumberAnimation) +Removed ParentAction (use ParentAnimation instead) +ScriptAction: renamed stateChangeScriptName -> scriptName +Animation: replace repeat with loops (loops: Animation.Infinite gives the old repeat behavior) C++ API ------- @@ -25,6 +28,44 @@ syntax has been introduced: Item { Behavior on x {}; NumberAnimation on y {} } Only the syntax has changed, the behavior is identical. +Script element removed +---------------------- +Inline Script{} blocks have been deprecated, and will soon be removed entirely. +If you used Script to write inline javascript code, it can simply be removed. +For example + +Item { + Script { + function doSomething() {} + } +} + +becomes + +Item { + function doSomething() {} +} + +If you used Script to include external JavaScript files, you can replace the +Script element with an “import” line. For example + +MouseArea { + Script { + source: “foo.js” + } + onClicked: foo() +} + +becomes + +Import “foo.js” as Foo +MouseArea { + onClicked: Foo.foo() +} + +The “as” qualifier is mandatory for script imports (as opposed to type +imports where it is optional). + ============================================================================= The changes below are pre Qt 4.7.0 alpha |