diff options
author | David Boddie <david.boddie@nokia.com> | 2010-09-03 12:12:52 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-09-03 12:12:52 (GMT) |
commit | cb80c41e7bced1877312468e7f65e3a561e7d161 (patch) | |
tree | 4f8b9d8008b12e9c810705e8254182e2423310a3 /src/declarative/qml/qdeclarativevmemetaobject.cpp | |
parent | aacf7c5a8b98f0dd4039d7f7a9d0471c32034a3b (diff) | |
parent | ca68786e62e0e645b692dc19a87b7dc3b2219ffd (diff) | |
download | Qt-cb80c41e7bced1877312468e7f65e3a561e7d161.zip Qt-cb80c41e7bced1877312468e7f65e3a561e7d161.tar.gz Qt-cb80c41e7bced1877312468e7f65e3a561e7d161.tar.bz2 |
Merge branch '4.7' into qmldocs
Conflicts:
doc/src/snippets/declarative/qml-intro/basic-syntax.qml
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) |