aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-14 14:41:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:20 +0200
commit269e29fdf36dd700d8c985dc7f11dbb5c8746c51 (patch)
treedde17b25e0111dcf3e6783f1ab07982a247b35e7 /src/qml/qml/qqmlengine.cpp
parentb4b4a646800fabbb31b4b261ea4b802d78d6501f (diff)
[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 <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp3
1 files changed, 3 insertions, 0 deletions
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<QObject>(obj), index));
+ } else if (activeObjectCreator) {
+ activeObjectCreator->finalizeCallbacks.append(qMakePair(QPointer<QObject>(obj), index));
} else {
void *args[] = { 0 };
QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, index, args);