![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qqmlobjectcreator_p.h>
Public Types | |
| enum class | InitFlag : quint8 { None = 0x0 , IsDocumentRoot = 0x1 , IsContextObject = 0x2 , IsImplicitComponent = 0x4 } |
| enum | CreationFlags { NormalObject = 1 , InlineComponent = 2 } |
Static Public Member Functions | |
| static QQmlComponent * | createComponent (QQmlEngine *engine, QV4::ExecutableCompilationUnit *compilationUnit, int indexindex, QObject *parent, const QQmlRefPointer< QQmlContextData > &context) |
Public Attributes | |
| QList< QQmlError > | errors |
Friends | |
| struct | QQmlObjectCreatorRecursionWatcher |
Definition at line 137 of file qqmlobjectcreator_p.h.
| Enumerator | |
|---|---|
| NormalObject | |
| InlineComponent | |
Definition at line 157 of file qqmlobjectcreator_p.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| IsDocumentRoot | |
| IsContextObject | |
| IsImplicitComponent | |
Definition at line 141 of file qqmlobjectcreator_p.h.
| QQmlObjectCreator::QQmlObjectCreator | ( | const QQmlRefPointer< QQmlContextData > & | parentContext, |
| const QQmlRefPointer< QV4::ExecutableCompilationUnit > & | compilationUnit, | ||
| const QQmlRefPointer< QQmlContextData > & | creationContext, | ||
| const QString & | inlineComponentName, | ||
| QQmlIncubatorPrivate * | incubator = nullptr ) |
| QQmlObjectCreator::~QQmlObjectCreator | ( | ) |
Definition at line 124 of file qqmlobjectcreator.cpp.
Definition at line 188 of file qqmlobjectcreator_p.h.
| bool QQmlObjectCreator::applyLateBinding | ( | int | index, |
| QObject * | instance, | ||
| const QQmlRefPointer< QQmlContextData > & | instanceContext, | ||
| int | bindingIndex ) |
Install the binding at bindingIndex of the compiled object index onto the already created instance (at instanceContext), reusing the normal binding-setup path. Only that one binding is applied and the {instance}'s identity (ddata, compilation unit and property cache) is preserved. The caller must call finalize() afterwards to enable and evaluate the installed binding.
Used by the QML preview's in-place patch to add a binding without rebuilding. Returns true if the binding was installed.
Definition at line 2223 of file qqmlobjectcreator.cpp.
| void QQmlObjectCreator::beginPopulateDeferred | ( | const QQmlRefPointer< QQmlContextData > & | context | ) |
Definition at line 241 of file qqmlobjectcreator.cpp.
| void QQmlObjectCreator::clear | ( | ) |
Definition at line 1831 of file qqmlobjectcreator.cpp.
|
inline |
Definition at line 180 of file qqmlobjectcreator_p.h.
|
inline |
Definition at line 191 of file qqmlobjectcreator_p.h.
| QObject * QQmlObjectCreator::create | ( | int | subComponentIndex = -1, |
| QObject * | parent = nullptr, | ||
| QQmlInstantiationInterrupt * | interrupt = nullptr, | ||
| int | flags = NormalObject ) |
Definition at line 139 of file qqmlobjectcreator.cpp.
|
static |
Definition at line 2086 of file qqmlobjectcreator.cpp.
| QObject * QQmlObjectCreator::createObjectInContext | ( | int | objectIndex, |
| QObject * | parent, | ||
| const QQmlRefPointer< QQmlContextData > & | existingContext ) |
Create a single object at objectIndex within an already-existing existingContext. Unlike create(), this does not allocate a new context — the object is registered as an OrdinaryObject in existingContext.
Definition at line 1675 of file qqmlobjectcreator.cpp.
| bool QQmlObjectCreator::finalize | ( | QQmlInstantiationInterrupt & | interrupt | ) |
Definition at line 1695 of file qqmlobjectcreator.cpp.
| void QQmlObjectCreator::finalizePopulateDeferred | ( | ) |
Definition at line 314 of file qqmlobjectcreator.cpp.
|
inline |
Definition at line 184 of file qqmlobjectcreator_p.h.
| void QQmlObjectCreator::populateDeferredBinding | ( | const QQmlProperty & | qmlProperty, |
| int | deferredIndex, | ||
| const QV4::CompiledData::Binding * | binding ) |
Definition at line 293 of file qqmlobjectcreator.cpp.
| void QQmlObjectCreator::populateDeferredInstance | ( | QObject * | outerObject, |
| int | deferredIndex, | ||
| int | index, | ||
| QObject * | instance, | ||
| QObject * | bindingTarget, | ||
| const QQmlPropertyData * | valueTypeProperty, | ||
| const QV4::CompiledData::Binding * | binding = nullptr ) |
Definition at line 304 of file qqmlobjectcreator.cpp.
| bool QQmlObjectCreator::populateDeferredProperties | ( | QObject * | instance, |
| const QQmlData::DeferredData * | deferredData ) |
Definition at line 284 of file qqmlobjectcreator.cpp.
| QQmlObjectCreator::Q_DECLARE_FLAGS | ( | InitFlags | , |
| InitFlag | ) |
Definition at line 197 of file qqmlobjectcreator_p.h.
| void QQmlObjectCreator::repopulateBindings | ( | int | index, |
| QObject * | instance, | ||
| const QQmlRefPointer< QQmlContextData > & | instanceContext, | ||
| InitFlags | flags ) |
Re-populate bindings, functions and child objects on an existing instance whose VME metaobject chain has already been (re-)created externally.
Unlike initializeInstance(), this does not create a new VME — it uses the one already installed on the object. It sets up the context, registers the object by id, installs functions, evaluates bindings (which may create child objects), and connects aliases.
Used by the QML preview/hot-reload system to rebuild an object's contents after its VME hierarchy has been reconstructed.
Definition at line 2112 of file qqmlobjectcreator.cpp.
|
inline |
Definition at line 190 of file qqmlobjectcreator_p.h.
|
inline |
Definition at line 179 of file qqmlobjectcreator_p.h.
|
friend |
Definition at line 312 of file qqmlobjectcreator_p.h.
Definition at line 182 of file qqmlobjectcreator_p.h.