diff options
author | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-01-03 22:35:05 +0100 |
---|---|---|
committer | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-01-04 09:56:17 +0000 |
commit | a4b2fa94d28327b83c8a1ddce5741c29cb0a7e0c (patch) | |
tree | 42114d979cc0449a287079fd8951c6b2634816a5 /src/qml/qml | |
parent | 3b762574094e1a807fac7f83f07df2ebd8f1fc80 (diff) |
Fix value changed logic for ValueTypeProvider types
Fix broken value changed logic for types implemented
through the ValueTypeProvider interface (QtQuick and Qt3d).
It affects vector2d, vector3d, ...
The signal was not emitted for the cases where the new value
was equal to the default value of a given type.
Also add a unit test to cover this area.
Change-Id: I9491b0462c78fecc4c704ea36921611c1bd6b2ee
Task-number: QTBUG-50204
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 37dbfec2a3..e85b3dc82c 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -731,8 +731,8 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * if (!v) { *(md->data() + id) = cache->engine->newVariantObject(QVariant()); v = (md->data() + id)->as<QV4::VariantObject>(); + QQml_valueTypeProvider()->initValueType(t, v->d()->data); } - QQml_valueTypeProvider()->initValueType(t, v->d()->data); needActivate = !QQml_valueTypeProvider()->equalValueType(t, a[0], v->d()->data); QQml_valueTypeProvider()->writeValueType(t, a[0], v->d()->data); } |