diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 08:19:06 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 08:19:06 (GMT) |
commit | cf6f2eb2ccd1675d890904d12c9717e4570b123b (patch) | |
tree | fe7fac37c271acace3c2c4d6ff887116cebafabe /src/declarative/qml/qdeclarativebinding.cpp | |
parent | 3d90e35abae15f133ad2a71874f6926773c96449 (diff) | |
download | Qt-cf6f2eb2ccd1675d890904d12c9717e4570b123b.zip Qt-cf6f2eb2ccd1675d890904d12c9717e4570b123b.tar.gz Qt-cf6f2eb2ccd1675d890904d12c9717e4570b123b.tar.bz2 |
Allow undefined to be assigned to QVariant properties
QTBUG-9704
Diffstat (limited to 'src/declarative/qml/qdeclarativebinding.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativebinding.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 91eb915..e172a8b 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -174,6 +174,10 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) data->property.reset(); + } else if (isUndefined && data->property.propertyType() == qMetaTypeId<QVariant>()) { + + QDeclarativePropertyPrivate::write(data->property, QVariant(), flags); + } else if (isUndefined) { QUrl url = QUrl(data->url); |