diff options
author | Chris Adams <christopher.adams@nokia.com> | 2011-09-30 11:14:10 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-06 05:29:00 +0200 |
commit | 752cd2aca42f6625f1cfc364937e0d39828cf954 (patch) | |
tree | dcb8891d7ff0d99d7bcbf948ed6339c4cce6b257 /src/declarative/qml/qdeclarativescript.cpp | |
parent | 6bd1704c42f564980677682e1d47e91129d94e5c (diff) | |
download | qtdeclarative-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.cpp | 3 |
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]); |