diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-29 11:14:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-31 15:09:42 +0200 |
commit | d818575966e2e2000fe2b7ee390c620f595d9825 (patch) | |
tree | 262a734cee3a639e0f94b4ee986cc778f7918207 /src/qml/doc | |
parent | 474895df9c171964ec2170c1066fb0fef4fda7d2 (diff) |
Deprecate the with statement in QML
It is generally considered deprecated in JavaScript and its use disables
a whole range of optimizations that we would like to apply in the future.
Therefore this patch will issue a warning if the with statement is detected.
This change is also documented, along with the plan on enabling strict mode
in the future.
Change-Id: Ie60f0536e0bdd6ecc537d8e34efbd8868bcad743
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/javascript/hostenvironment.qdoc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/doc/src/javascript/hostenvironment.qdoc b/src/qml/doc/src/javascript/hostenvironment.qdoc index a63ef617c0..3bd64ac115 100644 --- a/src/qml/doc/src/javascript/hostenvironment.qdoc +++ b/src/qml/doc/src/javascript/hostenvironment.qdoc @@ -166,6 +166,15 @@ Item { } \endqml +\li The \c with statement is deprecated. Using the \c with statement will issue a warning +at loading time and we plan on removing support for it in Qt 5.2. It is generally considered +a language feature that is not recommended for use due reducing the readability of code and disabling +many optimizations in the engine. It is also forbidden in ECMAScript 5 strict mode. + +\li JavaScript binding expressions are executed in non-strict mode. However we +plan on changing the default for bindings in Qt 5.2 to execute always in +ECMAScript 5 strict mode. + \endlist |