Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlObjectCreator Class Reference

#include <qqmlobjectcreator_p.h>

+ Collaboration diagram for QQmlObjectCreator:

Public Types

enum  CreationFlags { NormalObject = 1 , InlineComponent = 2 }
 

Public Member Functions

 QQmlObjectCreator (QQmlRefPointer< QQmlContextData > parentContext, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QQmlRefPointer< QQmlContextData > &creationContext, QQmlIncubatorPrivate *incubator=nullptr)
 
 ~QQmlObjectCreator ()
 
QObjectcreate (int subComponentIndex=-1, QObject *parent=nullptr, QQmlInstantiationInterrupt *interrupt=nullptr, int flags=NormalObject)
 
bool populateDeferredProperties (QObject *instance, const QQmlData::DeferredData *deferredData)
 
void beginPopulateDeferred (const QQmlRefPointer< QQmlContextData > &context)
 
void populateDeferredBinding (const QQmlProperty &qmlProperty, int deferredIndex, const QV4::CompiledData::Binding *binding)
 
void finalizePopulateDeferred ()
 
bool finalize (QQmlInstantiationInterrupt &interrupt)
 
void clear ()
 
QQmlRefPointer< QQmlContextDatarootContext () const
 
QQmlComponentAttached ** componentAttachment ()
 
QQmlRefPointer< QQmlContextDataparentContextData () const
 
QFiniteStack< QQmlGuard< QObject > > & allCreatedObjects ()
 
RequiredPropertiesrequiredProperties ()
 
bool componentHadTopLevelRequiredProperties () const
 
void removePendingBinding (QObject *target, int propertyIndex)
 

Static Public Member Functions

static QQmlComponentcreateComponent (QQmlEngine *engine, QV4::ExecutableCompilationUnit *compilationUnit, int index, QObject *parent, const QQmlRefPointer< QQmlContextData > &context)
 

Public Attributes

QList< QQmlErrorerrors
 

Friends

struct QQmlObjectCreatorRecursionWatcher
 

Detailed Description

Definition at line 104 of file qqmlobjectcreator_p.h.

Member Enumeration Documentation

◆ CreationFlags

Enumerator
NormalObject 
InlineComponent 

Definition at line 114 of file qqmlobjectcreator_p.h.

Constructor & Destructor Documentation

◆ QQmlObjectCreator()

QQmlObjectCreator::QQmlObjectCreator ( QQmlRefPointer< QQmlContextData parentContext,
const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit,
const QQmlRefPointer< QQmlContextData > &  creationContext,
QQmlIncubatorPrivate incubator = nullptr 
)

◆ ~QQmlObjectCreator()

QQmlObjectCreator::~QQmlObjectCreator ( )

Definition at line 121 of file qqmlobjectcreator.cpp.

Member Function Documentation

◆ allCreatedObjects()

QFiniteStack< QQmlGuard< QObject > > & QQmlObjectCreator::allCreatedObjects ( )
inline

Definition at line 137 of file qqmlobjectcreator_p.h.

◆ beginPopulateDeferred()

void QQmlObjectCreator::beginPopulateDeferred ( const QQmlRefPointer< QQmlContextData > &  context)

Definition at line 230 of file qqmlobjectcreator.cpp.

Referenced by QQmlBindPrivate::decodeBinding().

+ Here is the caller graph for this function:

◆ clear()

void QQmlObjectCreator::clear ( )

Definition at line 1529 of file qqmlobjectcreator.cpp.

References QQmlObjectCreatorSharedState::allCreatedObjects, QQmlObjectCreatorSharedState::componentAttached, QJSEngine::CppOwnership, engine, QFiniteStack< T >::isEmpty(), QJSEngine::objectOwnership(), QFiniteStack< T >::pop(), Q_ASSERT, and QQmlComponentAttached::removeFromList().

Referenced by QQmlIncubatorPrivate::clear().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ componentAttachment()

QQmlComponentAttached ** QQmlObjectCreator::componentAttachment ( )
inline

Definition at line 129 of file qqmlobjectcreator_p.h.

◆ componentHadTopLevelRequiredProperties()

bool QQmlObjectCreator::componentHadTopLevelRequiredProperties ( ) const
inline

Definition at line 140 of file qqmlobjectcreator_p.h.

Referenced by QQmlComponentPrivate::hadTopLevelRequiredProperties(), and QQmlIncubatorPrivate::hadTopLevelRequiredProperties().

+ Here is the caller graph for this function:

◆ create()

QObject * QQmlObjectCreator::create ( int  subComponentIndex = -1,
QObject parent = nullptr,
QQmlInstantiationInterrupt interrupt = nullptr,
int  flags = NormalObject 
)

Definition at line 139 of file qqmlobjectcreator.cpp.

Referenced by QQmlComponentPrivate::beginCreate(), and QQmlIncubatorPrivate::incubate().

+ Here is the caller graph for this function:

◆ createComponent()

QQmlComponent * QQmlObjectCreator::createComponent ( QQmlEngine engine,
QV4::ExecutableCompilationUnit compilationUnit,
int  index,
QObject parent,
const QQmlRefPointer< QQmlContextData > &  context 
)
static

Definition at line 1755 of file qqmlobjectcreator.cpp.

References component(), context, QQmlComponentPrivate::creationContext, engine, QQmlData::get(), QQmlComponentPrivate::get(), and parent.

+ Here is the call graph for this function:

◆ finalize()

bool QQmlObjectCreator::finalize ( QQmlInstantiationInterrupt interrupt)

Definition at line 1416 of file qqmlobjectcreator.cpp.

References QQmlObjectCreatorSharedState::allCreatedBindings, QQmlObjectCreatorSharedState::allParserStatusCallbacks, QQmlObjectCreatorSharedState::allQPropertyBindings, QMetaObject::BindableProperty, QQmlPropertyData::BypassInterceptor, QList< T >::clear(), QQmlObjectCreatorSharedState::componentAttached, QQmlParserStatus::componentComplete(), QQmlVME::componentCompleteEnabled(), d, QQmlPropertyData::DontRemoveBinding, emit, engine, QQmlJavaScriptExpression::error(), QQmlObjectCreatorSharedState::finalizeHooks, QList< T >::first(), QPropertyBindingPrivate::get(), QQmlData::get(), QQmlEnginePrivate::get(), QQmlBinding::hasDependencies(), QQmlJavaScriptExpression::hasError(), QQmlJavaScriptExpression::hasUnresolvedNames(), QFiniteStack< T >::isEmpty(), QList< T >::isEmpty(), QQmlPropertyBinding::jsExpression(), QFiniteStack< T >::pop(), QList< T >::pop_front(), priv(), QQmlObjectCreatorSharedState::profiler, Q_ASSERT, QQmlAbstractBinding::QmlBinding, QQmlComponentAttached::removeFromList(), QQmlAbstractBinding::removeFromObject(), QUntypedBindable::setBinding(), QQmlInstantiationInterrupt::shouldInterrupt(), QUntypedBindable::takeBinding(), and watcher.

Referenced by QQmlComponentPrivate::complete(), and QQmlIncubatorPrivate::incubate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finalizePopulateDeferred()

void QQmlObjectCreator::finalizePopulateDeferred ( )

Definition at line 293 of file qqmlobjectcreator.cpp.

Referenced by QQmlBindPrivate::buildBindEntries().

+ Here is the caller graph for this function:

◆ parentContextData()

QQmlRefPointer< QQmlContextData > QQmlObjectCreator::parentContextData ( ) const
inline

Definition at line 133 of file qqmlobjectcreator_p.h.

◆ populateDeferredBinding()

void QQmlObjectCreator::populateDeferredBinding ( const QQmlProperty qmlProperty,
int  deferredIndex,
const QV4::CompiledData::Binding binding 
)

Definition at line 282 of file qqmlobjectcreator.cpp.

Referenced by QQmlBindPrivate::decodeBinding().

+ Here is the caller graph for this function:

◆ populateDeferredProperties()

bool QQmlObjectCreator::populateDeferredProperties ( QObject instance,
const QQmlData::DeferredData deferredData 
)

Definition at line 273 of file qqmlobjectcreator.cpp.

◆ removePendingBinding()

void QQmlObjectCreator::removePendingBinding ( QObject target,
int  propertyIndex 
)
inline

Definition at line 147 of file qqmlobjectcreator_p.h.

References QList< T >::begin(), QList< T >::data(), QList< T >::end(), QList< T >::erase(), and it.

+ Here is the call graph for this function:

◆ requiredProperties()

RequiredProperties * QQmlObjectCreator::requiredProperties ( )
inline

Definition at line 139 of file qqmlobjectcreator_p.h.

Referenced by QQmlIncubatorPrivate::incubate(), and QQmlIncubatorPrivate::requiredProperties().

+ Here is the caller graph for this function:

◆ rootContext()

QQmlRefPointer< QQmlContextData > QQmlObjectCreator::rootContext ( ) const
inline

Definition at line 128 of file qqmlobjectcreator_p.h.

Referenced by QQmlIncubatorPrivate::incubate().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QQmlObjectCreatorRecursionWatcher

friend struct QQmlObjectCreatorRecursionWatcher
friend

Definition at line 235 of file qqmlobjectcreator_p.h.

Member Data Documentation

◆ errors

QList<QQmlError> QQmlObjectCreator::errors

Definition at line 131 of file qqmlobjectcreator_p.h.

Referenced by QQmlIncubatorPrivate::incubate().


The documentation for this class was generated from the following files: