summaryrefslogtreecommitdiff
path: root/src/declarative/qml/qdeclarativescript.cpp
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2011-09-30 11:14:10 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-06 05:29:00 +0200
commit752cd2aca42f6625f1cfc364937e0d39828cf954 (patch)
treedcb8891d7ff0d99d7bcbf948ed6339c4cce6b257 /src/declarative/qml/qdeclarativescript.cpp
parent6bd1704c42f564980677682e1d47e91129d94e5c (diff)
downloadqtdeclarative-752cd2aca42f6625f1cfc364937e0d39828cf954.tar.gz
Add JavaScript "var" property type to QML
This commit adds a new syntax which allows "var" type properties which can have JavaScript objects (as well as other basic types) assigned to them. Such JavaScript objects cannot be bound to. Task-number: QMLNG-18 Change-Id: If7f5045f4669e0d5c1b8d0891ed765128d0bc1c6 Reviewed-on: http://codereview.qt-project.org/1466 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativescript.cpp')
-rw-r--r--src/declarative/qml/qdeclarativescript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativescript.cpp b/src/declarative/qml/qdeclarativescript.cpp
index 8fb423c308..2bc358a579 100644
--- a/src/declarative/qml/qdeclarativescript.cpp
+++ b/src/declarative/qml/qdeclarativescript.cpp
@@ -920,7 +920,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node)
// { "time", strlen("time"), Object::DynamicProperty::Time, "QTime", strlen("QTime") },
// { "date", strlen("date"), Object::DynamicProperty::Date, "QDate", strlen("QDate") },
{ "date", strlen("date"), Object::DynamicProperty::DateTime, "QDateTime", strlen("QDateTime") },
- { "variant", strlen("variant"), Object::DynamicProperty::Variant, "QVariant", strlen("QVariant") }
+ { "variant", strlen("variant"), Object::DynamicProperty::Variant, "QVariant", strlen("QVariant") },
+ { "var", strlen("var"), Object::DynamicProperty::Var, "QVariant", strlen("QVariant") }
};
static const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) /
sizeof(propTypeNameToTypes[0]);