diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-04-23 05:37:32 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-04-23 05:37:32 (GMT) |
commit | dd9617e4cdf05319f272804e293d870a00aa0b66 (patch) | |
tree | 88749a324f7e052ae93a550e9be89a37ce7f7e48 /doc | |
parent | 624c561d64e37f8fe8cd06d4ce779b8794baddcb (diff) | |
download | Qt-dd9617e4cdf05319f272804e293d870a00aa0b66.zip Qt-dd9617e4cdf05319f272804e293d870a00aa0b66.tar.gz Qt-dd9617e4cdf05319f272804e293d870a00aa0b66.tar.bz2 |
Replace usage of print() with console.log().
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/javascriptblocks.qdoc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc index d9a2ba5..2db7e8e 100644 --- a/doc/src/declarative/javascriptblocks.qdoc +++ b/doc/src/declarative/javascriptblocks.qdoc @@ -75,7 +75,7 @@ Item { MouseArea { anchors.fill: parent - onClicked: print(factorial(10)) + onClicked: console.log(factorial(10)) } } \endcode @@ -99,7 +99,7 @@ import "factorial.js" as MathFunctions Item { MouseArea { anchors.fill: parent - onClicked: print(MathFunctions.factorial(10)) + onClicked: console.log(MathFunctions.factorial(10)) } } \endcode @@ -207,16 +207,18 @@ is illegal in QML. \code // Illegal modification of undeclared variable a = 1; -for (var ii = 1; ii < 10; ++ii) a = a * ii; - console.log("Result: " + a); +for (var ii = 1; ii < 10; ++ii) + a = a * ii; +console.log("Result: " + a); \endcode It can be trivially modified to this legal code. \code var a = 1; -for (var ii = 1; ii < 10; ++ii) a = a * ii; - console.log("Result: " + a); +for (var ii = 1; ii < 10; ++ii) + a = a * ii; +console.log("Result: " + a); \endcode Any attempt to modify the global object - either implicitly or explicitly - will |