summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-11 12:00:46 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-11 12:00:46 (GMT)
commit3e8791f60bdba5966054f025312d55756f0a17d3 (patch)
treeb471a8f2efdba25304c2862ede01db5e701d0f08 /src/declarative/qml/qmlvmemetaobject.cpp
parent835a23891567831cf184e5bbaba8d00bfc912699 (diff)
downloadQt-3e8791f60bdba5966054f025312d55756f0a17d3.zip
Qt-3e8791f60bdba5966054f025312d55756f0a17d3.tar.gz
Qt-3e8791f60bdba5966054f025312d55756f0a17d3.tar.bz2
Fixup qmllanguage::aliasProperties test
Diffstat (limited to 'src/declarative/qml/qmlvmemetaobject.cpp')
-rw-r--r--src/declarative/qml/qmlvmemetaobject.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp
index 5315089..ed28d78 100644
--- a/src/declarative/qml/qmlvmemetaobject.cpp
+++ b/src/declarative/qml/qmlvmemetaobject.cpp
@@ -210,17 +210,18 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
if (id < metaData->aliasCount) {
- if (!ctxt) return -1;
QmlVMEMetaData::AliasData *d = metaData->aliasData() + id;
+
+ if (d->flags & QML_ALIAS_FLAG_PTR && c == QMetaObject::ReadProperty)
+ *reinterpret_cast<void **>(a[0]) = 0;
+
+ if (!ctxt) return -1;
QmlContextPrivate *ctxtPriv =
(QmlContextPrivate *)QObjectPrivate::get(ctxt);
QObject *target = ctxtPriv->idValues[d->contextIdx].data();
- if (!target) {
- if (d->propertyIdx == -1)
- *reinterpret_cast<QObject **>(a[0]) = target;
+ if (!target)
return -1;
- }
if (c == QMetaObject::ReadProperty && !aConnected.testBit(id)) {
int sigIdx = methodOffset + id + metaData->propertyCount;