From 269e29fdf36dd700d8c985dc7f11dbb5c8746c51 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sat, 14 Sep 2013 14:41:18 +0200 Subject: [new compiler] Add support for finalization callbacks This is needed for Component.onCompleted (the signal emission) as well as the private finalization callback API in QQmlEngine, used by QtQuick. The creator - similar to the VME - tracks the attached properties object of QQmlComponent through a linked list. Change-Id: I8ada94009a7ce2078feefd359485657626c300fb Reviewed-by: Lars Knoll --- src/qml/qml/qqmlengine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/qml/qqmlengine.cpp') diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index a2c190d0e6..afb993499d 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -554,6 +554,7 @@ QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) outputWarningsToStdErr(true), cleanup(0), erroredBindings(0), inProgressCreations(0), workerScriptEngine(0), activeVME(0), + activeObjectCreator(0), networkAccessManager(0), networkAccessManagerFactory(0), urlInterceptor(0), scarceResourcesRefCount(0), typeLoader(e), importDatabase(e), uniqueId(1), incubatorCount(0), incubationController(0), mutex(QMutex::Recursive) @@ -1030,6 +1031,8 @@ void QQmlEnginePrivate::registerFinalizeCallback(QObject *obj, int index) { if (activeVME) { activeVME->finalizeCallbacks.append(qMakePair(QPointer(obj), index)); + } else if (activeObjectCreator) { + activeObjectCreator->finalizeCallbacks.append(qMakePair(QPointer(obj), index)); } else { void *args[] = { 0 }; QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, index, args); -- cgit v1.2.3