Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 populateDeferredInstance (QObject *outerObject, int deferredIndex, int index, QObject *instance, QObject *bindingTarget, const QQmlPropertyData *valueTypeProperty, const QV4::CompiledData::Binding *binding=nullptr)
 
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 118 of file qqmlobjectcreator_p.h.

Member Enumeration Documentation

◆ CreationFlags

Enumerator
NormalObject 
InlineComponent 

Definition at line 128 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 123 of file qqmlobjectcreator.cpp.

Member Function Documentation

◆ allCreatedObjects()

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

Definition at line 155 of file qqmlobjectcreator_p.h.

◆ beginPopulateDeferred()

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

Definition at line 232 of file qqmlobjectcreator.cpp.

◆ clear()

void QQmlObjectCreator::clear ( )

Definition at line 1613 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 147 of file qqmlobjectcreator_p.h.

◆ componentHadTopLevelRequiredProperties()

bool QQmlObjectCreator::componentHadTopLevelRequiredProperties ( ) const
inline

Definition at line 158 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 141 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 1839 of file qqmlobjectcreator.cpp.

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

+ Here is the call graph for this function:

◆ finalize()

bool QQmlObjectCreator::finalize ( QQmlInstantiationInterrupt & interrupt)

Definition at line 1490 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 306 of file qqmlobjectcreator.cpp.

◆ parentContextData()

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

Definition at line 151 of file qqmlobjectcreator_p.h.

◆ populateDeferredBinding()

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

Definition at line 285 of file qqmlobjectcreator.cpp.

◆ populateDeferredInstance()

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 296 of file qqmlobjectcreator.cpp.

◆ populateDeferredProperties()

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

Definition at line 276 of file qqmlobjectcreator.cpp.

◆ removePendingBinding()

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

Definition at line 165 of file qqmlobjectcreator_p.h.

◆ requiredProperties()

RequiredProperties * QQmlObjectCreator::requiredProperties ( )
inline

Definition at line 157 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 146 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 251 of file qqmlobjectcreator_p.h.

Member Data Documentation

◆ errors

QList<QQmlError> QQmlObjectCreator::errors

Definition at line 149 of file qqmlobjectcreator_p.h.

Referenced by QQmlIncubatorPrivate::incubate().


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