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
QQmlIncubatorPrivate Class Reference

#include <qqmlincubator_p.h>

+ Inheritance diagram for QQmlIncubatorPrivate:
+ Collaboration diagram for QQmlIncubatorPrivate:

Public Types

enum  Progress : char { Execute , Completing , Completed }
 
enum  HadTopLevelRequired : bool { No = 0 , Yes = 1 }
 
typedef QQmlEnginePrivate::Incubator QIPBase
 

Public Member Functions

 QQmlIncubatorPrivate (QQmlIncubator *q, QQmlIncubator::IncubationMode m)
 
 ~QQmlIncubatorPrivate ()
 
QQmlIncubator::Status calculateStatus () const
 
void changeStatus (QQmlIncubator::Status)
 
void clear ()
 
void forceCompletion (QQmlInstantiationInterrupt &i)
 
void incubate (QQmlInstantiationInterrupt &i)
 
void incubateCppBasedComponent (QQmlComponent *component, QQmlContext *context)
 
RequiredPropertiesrequiredProperties ()
 Return a pointer to a list of properties which are required but haven't been set yet.
 
bool hadTopLevelRequiredProperties () const
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Static Public Member Functions

static QQmlIncubatorPrivateget (QQmlIncubator *incubator)
 

Public Attributes

int subComponentToCreate
 
QQmlIncubatorq
 
QQmlIncubator::Status status
 
QQmlIncubator::IncubationMode mode
 
bool isAsynchronous
 
Progress progress
 
QList< QQmlErrorerrors
 
QPointer< QObjectresult
 
QTaggedPointer< RequiredProperties, HadTopLevelRequiredrequiredPropertiesFromComponent
 
QQmlGuardedContextData rootContext
 
QQmlEnginePrivateenginePriv
 
QQmlRefPointer< QV4::ExecutableCompilationUnitcompilationUnit
 
QScopedPointer< QQmlObjectCreatorcreator
 
QQmlVMEGuard vmeGuard
 
QExplicitlySharedDataPointer< QQmlIncubatorPrivatewaitingOnMe
 
QIntrusiveListNode nextWaitingFor
 
QIntrusiveList< QQmlIncubatorPrivate, &QQmlIncubatorPrivate::nextWaitingForwaitingFor
 
QRecursionNode recursion
 
QVariantMap initialProperties
 
- Public Attributes inherited from QQmlEnginePrivate::Incubator
QIntrusiveListNode next
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Definition at line 33 of file qqmlincubator_p.h.

Member Typedef Documentation

◆ QIPBase

Member Enumeration Documentation

◆ HadTopLevelRequired

Enumerator
No 
Yes 

Definition at line 57 of file qqmlincubator_p.h.

◆ Progress

Enumerator
Execute 
Completing 
Completed 

Definition at line 50 of file qqmlincubator_p.h.

Constructor & Destructor Documentation

◆ QQmlIncubatorPrivate()

QQmlIncubatorPrivate::QQmlIncubatorPrivate ( QQmlIncubator * q,
QQmlIncubator::IncubationMode m )

Definition at line 93 of file qqmlincubator.cpp.

◆ ~QQmlIncubatorPrivate()

QQmlIncubatorPrivate::~QQmlIncubatorPrivate ( )

Definition at line 99 of file qqmlincubator.cpp.

References clear().

+ Here is the call graph for this function:

Member Function Documentation

◆ calculateStatus()

QQmlIncubator::Status QQmlIncubatorPrivate::calculateStatus ( ) const

Definition at line 796 of file qqmlincubator.cpp.

References compilationUnit, Completed, QQmlIncubator::Error, errors, QIntrusiveList< N, member >::isEmpty(), QList< T >::isEmpty(), QQmlIncubator::Loading, QQmlIncubator::Null, progress, QQmlIncubator::Ready, and waitingFor.

Referenced by incubate(), and incubateCppBasedComponent().

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

◆ changeStatus()

void QQmlIncubatorPrivate::changeStatus ( QQmlIncubator::Status s)

Definition at line 786 of file qqmlincubator.cpp.

References status.

Referenced by QQmlIncubator::clear(), incubate(), and incubateCppBasedComponent().

+ Here is the caller graph for this function:

◆ clear()

◆ forceCompletion()

void QQmlIncubatorPrivate::forceCompletion ( QQmlInstantiationInterrupt & i)

Definition at line 234 of file qqmlincubator.cpp.

References QIntrusiveList< N, member >::first(), forceCompletion(), i, incubate(), QIntrusiveList< N, member >::isEmpty(), QQmlIncubator::Loading, status, and waitingFor.

Referenced by QQmlIncubator::forceCompletion(), and forceCompletion().

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

◆ get()

◆ hadTopLevelRequiredProperties()

bool QQmlIncubatorPrivate::hadTopLevelRequiredProperties ( ) const

Definition at line 732 of file qqmlincubator.cpp.

References QQmlObjectCreator::componentHadTopLevelRequiredProperties(), creator, requiredPropertiesFromComponent, QTaggedPointer< T, Tag >::tag(), and Yes.

+ Here is the call graph for this function:

◆ incubate()

void QQmlIncubatorPrivate::incubate ( QQmlInstantiationInterrupt & i)

Definition at line 245 of file qqmlincubator.cpp.

References arg, calculateStatus(), QMap< Key, T >::cbegin(), QMap< Key, T >::cend(), changeStatus(), clear(), QQmlVMEGuard::clear(), compilationUnit, Completed, Completing, component(), QQmlObjectCreator::create(), creator, QScopedPointer< T, Cleanup >::data(), QQmlEnginePrivate::dereferenceScarceResources(), QHash< Key, T >::empty(), QV4::ExecutableCompilationUnit::engine, enginePriv, error, QQmlEnginePrivate::erroredBindings, errors, QQmlObjectCreator::errors, Execute, QQmlObjectCreator::finalize(), QQmlData::get(), QQmlEnginePrivate::get(), QQmlVMEGuard::guard(), i, initialProperties, QQmlEnginePrivate::inProgressCreations, QIntrusiveList< N, member >::isEmpty(), QList< T >::isEmpty(), QScopedPointer< T, Cleanup >::isNull(), QQmlVMEGuard::isOK(), QQmlProperty::isValid(), it, progress, QList< T >::push_back(), Q_ASSERT, QtCriticalMsg, QtInfoMsg, QQmlEnginePrivate::referenceScarceResources(), QQmlDelayedError::removeError(), QQmlComponentPrivate::removePropertyFromRequired(), requiredProperties(), QQmlObjectCreator::requiredProperties(), rootContext, QQmlObjectCreator::rootContext(), subComponentToCreate, QQmlComponentPrivate::unsetRequiredPropertyToQQmlError(), QV4::ExecutableCompilationUnit::url(), vmeGuard, waitingFor, waitingOnMe, QQmlEnginePrivate::warning(), watcher, and QQmlProperty::write().

Referenced by forceCompletion().

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

◆ incubateCppBasedComponent()

void QQmlIncubatorPrivate::incubateCppBasedComponent ( QQmlComponent * component,
QQmlContext * context )

This is used to mimic the behavior of incubate when the Component we want to incubate refers to a creatable QQmlType (i.e., it is the result of loadFromModule).

Definition at line 391 of file qqmlincubator.cpp.

References calculateStatus(), changeStatus(), Completed, component(), context, errors, QQmlComponentPrivate::get(), get(), initialProperties, QHash< Key, T >::isEmpty(), progress, Q_ASSERT, requiredPropertiesFromComponent, QTaggedPointer< T, Tag >::setTag(), QQmlComponentPrivate::unsetRequiredPropertyToQQmlError(), and Yes.

+ Here is the call graph for this function:

◆ requiredProperties()

RequiredProperties * QQmlIncubatorPrivate::requiredProperties ( )

Return a pointer to a list of properties which are required but haven't been set yet.

This list can be modified, so that subclasses which implement special logic setInitialProperties can mark properties set there as no longer required.

See also
QQmlIncubator::setInitialProperties
Since
5.15

Definition at line 724 of file qqmlincubator.cpp.

References creator, QTaggedPointer< T, Tag >::data(), QQmlObjectCreator::requiredProperties(), and requiredPropertiesFromComponent.

Referenced by incubate().

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

Member Data Documentation

◆ compilationUnit

QQmlRefPointer<QV4::ExecutableCompilationUnit> QQmlIncubatorPrivate::compilationUnit

Definition at line 67 of file qqmlincubator_p.h.

Referenced by calculateStatus(), QQmlIncubator::clear(), clear(), and incubate().

◆ creator

QScopedPointer<QQmlObjectCreator> QQmlIncubatorPrivate::creator

◆ enginePriv

QQmlEnginePrivate* QQmlIncubatorPrivate::enginePriv

Definition at line 66 of file qqmlincubator_p.h.

Referenced by QQmlIncubator::clear(), clear(), and incubate().

◆ errors

QList<QQmlError> QQmlIncubatorPrivate::errors

◆ initialProperties

QVariantMap QQmlIncubatorPrivate::initialProperties

◆ isAsynchronous

bool QQmlIncubatorPrivate::isAsynchronous

Definition at line 49 of file qqmlincubator_p.h.

◆ mode

QQmlIncubator::IncubationMode QQmlIncubatorPrivate::mode

Definition at line 48 of file qqmlincubator_p.h.

Referenced by QQmlIncubator::incubationMode().

◆ nextWaitingFor

QIntrusiveListNode QQmlIncubatorPrivate::nextWaitingFor

Definition at line 73 of file qqmlincubator_p.h.

Referenced by clear().

◆ progress

Progress QQmlIncubatorPrivate::progress

◆ q

QQmlIncubator* QQmlIncubatorPrivate::q

Definition at line 42 of file qqmlincubator_p.h.

Referenced by QQmlIncubator::~QQmlIncubator().

◆ recursion

QRecursionNode QQmlIncubatorPrivate::recursion

Definition at line 76 of file qqmlincubator_p.h.

◆ requiredPropertiesFromComponent

QTaggedPointer<RequiredProperties, HadTopLevelRequired> QQmlIncubatorPrivate::requiredPropertiesFromComponent

◆ result

QPointer<QObject> QQmlIncubatorPrivate::result

Definition at line 56 of file qqmlincubator_p.h.

Referenced by QQmlIncubator::clear(), and QQmlIncubator::object().

◆ rootContext

QQmlGuardedContextData QQmlIncubatorPrivate::rootContext

Definition at line 65 of file qqmlincubator_p.h.

Referenced by clear(), and incubate().

◆ status

QQmlIncubator::Status QQmlIncubatorPrivate::status

Definition at line 46 of file qqmlincubator_p.h.

Referenced by changeStatus(), forceCompletion(), and QQmlIncubator::status().

◆ subComponentToCreate

int QQmlIncubatorPrivate::subComponentToCreate

Definition at line 41 of file qqmlincubator_p.h.

Referenced by incubate().

◆ vmeGuard

QQmlVMEGuard QQmlIncubatorPrivate::vmeGuard

Definition at line 69 of file qqmlincubator_p.h.

Referenced by clear(), and incubate().

◆ waitingFor

◆ waitingOnMe

QExplicitlySharedDataPointer<QQmlIncubatorPrivate> QQmlIncubatorPrivate::waitingOnMe

Definition at line 71 of file qqmlincubator_p.h.

Referenced by QQmlIncubator::clear(), clear(), and incubate().


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