diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 03:31:25 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 03:33:39 (GMT) |
commit | 45ca7aff2c04c302906a1af0d9d671bb9cb452f0 (patch) | |
tree | 3d486beafbe66ec7fe0b6451abec652211c1328d /src/declarative/qml/qdeclarativebinding.cpp | |
parent | 25f17fb8e566fca0838545941d3e0281698ec355 (diff) | |
download | Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.zip Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.tar.gz Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.tar.bz2 |
Use variant instead of var in QML
In QML "var"s are not the same as JavaScript vars - they are QVariants
instead. However, as they behave in a similar enough fashion to native
JavaScript it can be confusing to developers when they are called "var".
Diffstat (limited to 'src/declarative/qml/qdeclarativebinding.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativebinding.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 6a99855..91eb915 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -170,19 +170,6 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) if (data->error.isValid()) { - } else if (!scriptValue.isVariant() && value.userType() == QMetaType::QVariantList && - data->property.propertyType() == qMetaTypeId<QVariant>()) { - - // This case catches QtScript's automatic conversion to QVariantList for arrays - QUrl url = QUrl(data->url); - int line = data->line; - if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>")); - - data->error.setUrl(url); - data->error.setLine(line); - data->error.setColumn(-1); - data->error.setDescription(QLatin1String("Unable to assign JavaScript array to QML variant property")); - } else if (isUndefined && data->property.isResettable()) { data->property.reset(); |