diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-09-01 02:21:02 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-09-01 02:21:02 (GMT) |
commit | c8c8fd92baee91d3079e9696c3c05d0fa455f7ab (patch) | |
tree | c5d1c350b0d85b84b1db44551983bf0584aa464a /src/declarative | |
parent | 9c70c81e6af2435d8d8217b81714b2e087326ecf (diff) | |
parent | 79000fcf68787c16096ed2231ae849dcd5e83c02 (diff) | |
download | Qt-c8c8fd92baee91d3079e9696c3c05d0fa455f7ab.zip Qt-c8c8fd92baee91d3079e9696c3c05d0fa455f7ab.tar.gz Qt-c8c8fd92baee91d3079e9696c3c05d0fa455f7ab.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativevmemetaobject.cpp | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 3af892d..f439151 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -192,7 +192,7 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam if (!(hints & ImplicitObject)) { local.coreIndex = -1; lastData = &local; - return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess; + return QScriptClass::HandlesWriteAccess; } return 0; 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) |