From 469793778998aeaf46c99b7b8d049616bac4b689 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 Jun 2012 15:07:54 +0100 Subject: Fix crash in lazy meta object generation. Inside the property cache, override data can only handle overrides pointing to either a method or a property, but not to a signal handler. This is a bug in itself, but has never come up before due to no one following override data on methods. When this was changed by d2e557c2c2d7fcf3bf7c1676df3902e115986dc2, this bug was exposed. This change doesn't actually fix the underlying problem, but it does restore exactly the same behavior we had previously. The complete fix will come in a later change. Change-Id: I6a890e6ca1e40735da8158b21dfe38dc88091081 Reviewed-by: Martin Jones --- src/qml/qml/qqmlpropertycache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlpropertycache.cpp') diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 8167280142..b073d22e71 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -1201,7 +1201,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) QQmlPropertyData *olddata = data; data = This->overrideData(data); - if (data) Insert::in(This, properties, methods, iter, data); + if (data && !data->isFunction()) Insert::in(This, properties, methods, iter, data); } else { if (data->coreIndex < This->propertyIndexCacheStart) return; -- cgit v1.2.3