aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-07 01:01:54 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-07 01:01:55 +0100
commite04e5db13d2a1d03e4afe139fcc29e0ed5b1edab (patch)
treeca450c633cbce2c86293b302d6e448e652e0136b /src/qml/compiler
parent6a7c8749712c33e27cdbc93efdf54eddf8e7631f (diff)
parent895302829b46e00cde8eef13eb7c630af5d771e2 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-alpha1
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qqmlpropertyvalidator.cpp6
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp8
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions_p.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp
index 746f68369f..b1865121d3 100644
--- a/src/qml/compiler/qqmlpropertyvalidator.cpp
+++ b/src/qml/compiler/qqmlpropertyvalidator.cpp
@@ -276,7 +276,11 @@ QVector<QQmlCompileError> QQmlPropertyValidator::validateObject(int objectIndex,
}
} else {
if (!enginePrivate->propertyCacheForType(pd->propType())) {
- return recordError(binding->location, tr("Invalid grouped property access"));
+ return recordError(binding->location,
+ tr("Invalid grouped property access: Property \"%1\" with type \"%2\", which is not a value type")
+ .arg(name)
+ .arg(QString::fromLatin1(QMetaType::typeName(pd->propType())))
+ );
}
}
}
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index fc3ac769ae..e0eaa8867b 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -481,6 +481,14 @@ bool ScanFunctions::visit(FieldMemberExpression *ast)
return true;
}
+bool ScanFunctions::visit(ArrayPattern *ast)
+{
+ for (PatternElementList *it = ast->elements; it; it = it->next)
+ Node::accept(it->element, this);
+
+ return false;
+}
+
bool ScanFunctions::enterFunction(FunctionExpression *ast, bool enterName)
{
if (_context->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h
index 4463a4f4f3..28ad846bcd 100644
--- a/src/qml/compiler/qv4compilerscanfunctions_p.h
+++ b/src/qml/compiler/qv4compilerscanfunctions_p.h
@@ -120,6 +120,7 @@ protected:
bool visit(AST::TemplateLiteral *ast) override;
bool visit(AST::SuperLiteral *) override;
bool visit(AST::FieldMemberExpression *) override;
+ bool visit(AST::ArrayPattern *) override;
bool enterFunction(AST::FunctionExpression *ast, bool enterName);