diff options
author | David Boddie <david.boddie@nokia.com> | 2010-09-02 17:17:15 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-09-02 17:17:15 (GMT) |
commit | ca68786e62e0e645b692dc19a87b7dc3b2219ffd (patch) | |
tree | 5ca3034fea3566e136d893b9f16dc06db362096f /src/declarative/qml/qdeclarativevmemetaobject.cpp | |
parent | 63129c8bd21bfdc8110680296bb3bc1ab5e43343 (diff) | |
parent | 19beb3de012c4531dc69699bbb33f2cf1e86a84c (diff) | |
download | Qt-ca68786e62e0e645b692dc19a87b7dc3b2219ffd.zip Qt-ca68786e62e0e645b692dc19a87b7dc3b2219ffd.tar.gz Qt-ca68786e62e0e645b692dc19a87b7dc3b2219ffd.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/declarative/qml/qdeclarativevmemetaobject.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativevmemetaobject.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp index 689ed92..3e32006 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject.cpp +++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp @@ -707,11 +707,19 @@ void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QScriptValue &val void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QVariant &value) { - if (value.userType() == QMetaType::QObjectStar) + bool needActivate = false; + if (value.userType() == QMetaType::QObjectStar) { + QObject *o = qvariant_cast<QObject *>(value); + needActivate = (data[id].dataType() != QMetaType::QObjectStar || data[id].asQObject() != o); data[id].setValue(qvariant_cast<QObject *>(value)); - else + } else { + needActivate = (data[id].dataType() != qMetaTypeId<QVariant>() || + data[id].asQVariant().userType() != value.userType() || + data[id].asQVariant() != value); data[id].setValue(value); - activate(object, methodOffset + id, 0); + } + if (needActivate) + activate(object, methodOffset + id, 0); } void QDeclarativeVMEMetaObject::listChanged(int id) |