summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-22 22:57:57 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-22 22:57:57 (GMT)
commit83e395ba6de068ac4ecece860cc429a4697445d0 (patch)
tree0aa7613250cc09122c10fb2c4201848372785cc5 /src
parentb2fa1673937ac8100273729d925e445e2a938b03 (diff)
downloadQt-83e395ba6de068ac4ecece860cc429a4697445d0.zip
Qt-83e395ba6de068ac4ecece860cc429a4697445d0.tar.gz
Qt-83e395ba6de068ac4ecece860cc429a4697445d0.tar.bz2
Add Script removal to QmlChanges.txt
Diffstat (limited to 'src')
-rw-r--r--src/declarative/QmlChanges.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 7c584b4d..5da0f13 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -25,6 +25,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