From 16b680b734101db0cb4fa3f313ac563a509ddff4 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Mon, 25 Jul 2016 13:23:34 +0200 Subject: QQmlPropertyMap: Don't spuriously emit valueChanged() signal The valueChanged() signal was emitted when the property was written with the same value. This increased the potential for binding loops in user code. Change-Id: Ifeb8f6f23e2022aa35cb6cac7cf1a3dbc0e8ca2f Task-number: QTBUG-48136 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlopenmetaobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp index 9188ba6174..0e60cae92f 100644 --- a/src/qml/qml/qqmlopenmetaobject.cpp +++ b/src/qml/qml/qqmlopenmetaobject.cpp @@ -272,7 +272,7 @@ int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void * propertyRead(propId); *reinterpret_cast(a[0]) = d->getData(propId); } else if (c == QMetaObject::WriteProperty) { - if (propId <= d->data.count() || d->data[propId].first != *reinterpret_cast(a[0])) { + if (propId >= d->data.count() || d->data[propId].first != *reinterpret_cast(a[0])) { propertyWrite(propId); QPair &prop = d->getDataRef(propId); prop.first = propertyWriteValue(propId, *reinterpret_cast(a[0])); -- cgit v1.2.3