aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire@kdab.com>2016-07-25 13:23:34 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-07-25 16:14:18 +0000
commit16b680b734101db0cb4fa3f313ac563a509ddff4 (patch)
treed4c389b36649a3e86dd8ec79fc8c7c57dedbe104 /src
parentf32d0f724ff2010bfb69f8b1772a62b5a2141823 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlopenmetaobject.cpp2
1 files changed, 1 insertions, 1 deletions
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<QVariant *>(a[0]) = d->getData(propId);
} else if (c == QMetaObject::WriteProperty) {
- if (propId <= d->data.count() || d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
+ if (propId >= d->data.count() || d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
propertyWrite(propId);
QPair<QVariant, bool> &prop = d->getDataRef(propId);
prop.first = propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0]));