summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlmetaproperty.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-14 03:54:55 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-15 07:30:16 (GMT)
commit4f7e21dc04ce93531ef68f7694a5e8969448de8b (patch)
treece7e8170b5be6c974420d012a03f620f86cd6d8d /src/declarative/qml/qmlmetaproperty.cpp
parent9eca9e028884fb82d97e284826faa7965af356bd (diff)
downloadQt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.zip
Qt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.tar.gz
Qt-4f7e21dc04ce93531ef68f7694a5e8969448de8b.tar.bz2
Rework compiler to a two phase analyse/generate approach
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index e158adf..6602021 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -663,9 +663,6 @@ void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value)
return;
}
- if (!value.isValid())
- return;
-
int t = propertyType();
int vt = value.userType();
int category = propertyCategory();
@@ -684,19 +681,22 @@ void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value)
QObject *o = QmlMetaType::toQObject(value);
- if (!o)
- return;
+ const QMetaObject *valMo = 0;
- const QMetaObject *valMo = o->metaObject();
- const QMetaObject *propMo = QmlMetaType::rawMetaObjectForType(t);
+ if (o) {
+
+ valMo = o->metaObject();
+ const QMetaObject *propMo = QmlMetaType::rawMetaObjectForType(t);
+
+ while (valMo) {
+ if (valMo == propMo)
+ break;
+ valMo = valMo->superClass();
+ }
- while (valMo) {
- if (valMo == propMo)
- break;
- valMo = valMo->superClass();
}
- if (valMo) {
+ if (valMo || !o) {
void *args[] = { &o, 0 };
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx,