aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-08-27 11:30:27 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-09-29 13:39:41 +0200
commit6c147a33639b3f056f7e81d1d671ff4f85918288 (patch)
tree6d63f4dfcb40673820f399ee343827719316d6a6 /src/qml/qml/qqmlengine_p.h
parentd9f9d773e92940786f159897623618f3bf6bcf0f (diff)
Long live (the internal) QQmlFinalizerHook!
QQmlFinalizerHook is meant to replace registerFinalizeCallback. The latter is more powerful: It allows you to register multiple functions, depending on various conditions. Moreover, if the component is already finalized, it directly runs the function. However, that power is not used anywhere: All we currently use and need is the ability to run a function after the component is finalized. By using an inerface instead of some generic registration framework, we can make finalizers visible to tooling. This is especially important for qmltc, which needs to instantiate the compiled components and still must ensure that finalizers do run. We also use this chance to document the existence of finalizers, as well as the difference between componentComplete and finalizers. The interface is kept internal, as asynchronus component instantiation is still an underdocumented corner of the QML engine, and the implications of making the interface public are unclear. Task-number: QTBUG-96054 Change-Id: I876bf9650faac20598cfd6aaea7c6da9bf65d73f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r--src/qml/qml/qqmlengine_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index 8c1f5c225c..ac3f05d62c 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -444,6 +444,7 @@ T QQmlEnginePrivate::singletonInstance(const QQmlType &type) {
return qobject_cast<T>(singletonInstance<QJSValue>(type).toQObject());
}
+
QT_END_NAMESPACE
#endif // QQMLENGINE_P_H