aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-10-18 15:42:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-21 15:18:15 +0200
commit8a6fadb39aec58f373ef24f39d39f7fbc050277d (patch)
tree60c3249feaee94d1b48f2fafb4d26af54b58ab26
parent486d367e8086e63f51707e78c07ef77fa6240f0a (diff)
Revert commit d818575966e2e2000fe2b7ee390c620f595d9825
This reverts the commit that deprecated the with statement and added a note to the docs that binding expressions will be compiled in strict mode in Qt 5.2. It turns out that we had to keep the with statement and enabling strict mode breaks just too much unfortunately. Change-Id: Id38c27f684fbfcb6b6b848be8f691658089d1adb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--src/qml/doc/src/javascript/hostenvironment.qdoc9
-rw-r--r--src/qml/parser/qqmljs.g4
-rw-r--r--src/qml/parser/qqmljsparser.cpp4
3 files changed, 0 insertions, 17 deletions
diff --git a/src/qml/doc/src/javascript/hostenvironment.qdoc b/src/qml/doc/src/javascript/hostenvironment.qdoc
index 3bd64ac115..a63ef617c0 100644
--- a/src/qml/doc/src/javascript/hostenvironment.qdoc
+++ b/src/qml/doc/src/javascript/hostenvironment.qdoc
@@ -166,15 +166,6 @@ 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
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index 8cc68e3643..de4fec4d56 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -2679,10 +2679,6 @@ case $rule_number: {
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
- if (lexer->qmlMode()) {
- const QString msg = qApp->translate("QQmlParser", "Deprecated JavaScript `with' statement detected in QML expression. Support for this will be removed in Qt 5.2!");
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, node->withToken, msg));
- }
} break;
./
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp
index 75f0f743b8..b86b4a987f 100644
--- a/src/qml/parser/qqmljsparser.cpp
+++ b/src/qml/parser/qqmljsparser.cpp
@@ -1560,10 +1560,6 @@ case 317: {
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
- if (lexer->qmlMode()) {
- const QString msg = qApp->translate("QQmlParser", "Deprecated JavaScript `with' statement detected in QML expression. Support for this will be removed in Qt 5.2!");
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, node->withToken, msg));
- }
} break;
case 318: {