4#ifndef QQMLCOMPONENT_P_H
5#define QQMLCOMPONENT_P_H
22#include <private/qqmlobjectcreator_p.h>
23#include <private/qqmltypedata_p.h>
24#include <private/qqmlguardedcontextdata_p.h>
26#include <QtCore/QString>
27#include <QtCore/QStringList>
28#include <QtCore/QList>
29#include <QtCore/qtclasshelpermacros.h>
31#include <private/qobject_p.h>
50 void completeCreate();
52 static void setInitialProperties(
58 virtual void incubateObject(
79 bool hadTopLevelRequiredProperties()
const;
110 m_creatorOrRequiredProperties.swap(
other.m_creatorOrRequiredProperties);
115 inline void ensureRequiredPropertyStorage();
117 inline void addPendingRequiredProperty(
120 inline bool hasUnsetRequiredProperties()
const;
121 inline void clearRequiredProperties();
124 inline void appendCreatorErrors();
129 inline bool hasCreator()
const;
135 inline bool isCompletePending()
const;
136 inline void setCompletePending(
bool isPending);
171 return compilationUnit
178 if (m_creatorOrRequiredProperties.
isT1())
179 delete m_creatorOrRequiredProperties.
asT1();
181 delete m_creatorOrRequiredProperties.
asT2();
186 errors = std::move(
other.errors);
187 m_creatorOrRequiredProperties = std::exchange(
other.m_creatorOrRequiredProperties, {});
195 if (m_creatorOrRequiredProperties.isNull())
197 else if (m_creatorOrRequiredProperties.isT1())
198 return m_creatorOrRequiredProperties.asT1()->requiredProperties();
200 return m_creatorOrRequiredProperties.asT2();
207 requiredProperties()->insert({
object, propData},
info);
217 if (
auto reqProps = requiredProperties())
224 errors.emplaceBack(
e);
232 auto creatorErrorCount =
creator()->errors.size();
233 if (creatorErrorCount == 0)
235 auto existingErrorCount = errors.size();
236 errors.resize(existingErrorCount + creatorErrorCount);
244 if (m_creatorOrRequiredProperties.isT1())
245 return m_creatorOrRequiredProperties.asT1();
251 if (m_creatorOrRequiredProperties.isT1())
252 return m_creatorOrRequiredProperties.asT1();
263 if (m_creatorOrRequiredProperties.isT1()) {
264 delete m_creatorOrRequiredProperties.asT1();
271 if (m_creatorOrRequiredProperties.isT1())
272 delete m_creatorOrRequiredProperties.asT1();
274 delete m_creatorOrRequiredProperties.asT2();
278 return m_creatorOrRequiredProperties.asT1();
283 return m_creatorOrRequiredProperties.flag();
288 m_creatorOrRequiredProperties.setFlagValue(isPending);
299 Q_ASSERT(m_creatorOrRequiredProperties.isT2() || m_creatorOrRequiredProperties.isNull());
300 if (m_creatorOrRequiredProperties.isNull())
static QObjectPrivate * get(QObject *o)
QQmlRefPointer< QV4::ExecutableCompilationUnit > compilationUnit
std::vector< ConstructionState > DeferredState
std::unique_ptr< QString > inlineComponentName
static QQmlComponentPrivate * get(QQmlComponent *c)
QQmlGuardedContextData creationContext
QQmlRefPointer< QQmlTypeData > typeData
@ CreateWarnAboutRequiredProperties
The QQmlComponent class encapsulates a QML component definition.
CompilationMode
Specifies whether the QQmlComponent should load the component immediately, or asynchonously.
The QQmlContext class defines a context within a QML engine.
The QQmlEngine class provides an environment for instantiating QML components.
The QQmlError class encapsulates a QML error.
The QQmlIncubator class allows QML objects to be created asynchronously.
The QQmlProperty class abstracts accessing properties on objects created from QML.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLsizei const GLfloat * v
[13]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLdouble GLdouble q
static qreal component(const QPointF &point, unsigned int i)
QQmlContext * qmlContext(const QObject *obj)
static bool isTransient(const QWindow *w)
QFileInfo info(fileName)
[8]
QItemEditorCreatorBase * creator
AnnotatedQmlError()=default
AnnotatedQmlError(QQmlError error, bool transient)
AnnotatedQmlError(QQmlError error)
void clearRequiredProperties()
bool isCompletePending() const
void ensureRequiredPropertyStorage()
QList< AnnotatedQmlError > errors
void appendErrors(const QList< QQmlError > &qmlErrors)
bool hasUnsetRequiredProperties() const
QQmlObjectCreator * creator()
void addPendingRequiredProperty(const QObject *object, const QQmlPropertyData *propData, const RequiredPropertyInfo &info)
void setCompletePending(bool isPending)
void swap(ConstructionState &other)
void appendCreatorErrors()
QQmlObjectCreator * initCreator(QQmlRefPointer< QQmlContextData > parentContext, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QQmlRefPointer< QQmlContextData > &creationContext)
ConstructionState()=default
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QQmlComponentPrivate::ConstructionState)
RequiredProperties * requiredProperties()
virtual void typeDataProgress(QQmlTypeData *, qreal)
virtual void typeDataReady(QQmlTypeData *)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent