aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/parser/qqmljsparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/parser/qqmljsparser.cpp')
-rw-r--r--src/qml/qml/parser/qqmljsparser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/parser/qqmljsparser.cpp b/src/qml/qml/parser/qqmljsparser.cpp
index a0fa7a4711..46b5c041d4 100644
--- a/src/qml/qml/parser/qqmljsparser.cpp
+++ b/src/qml/qml/parser/qqmljsparser.cpp
@@ -1515,6 +1515,10 @@ case 311: {
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 312: {