14#include <private/qqmljavascriptexpression_p.h>
15#include <private/qqmlsourcecoordinate_p.h>
17#include <private/qv4functionobject_p.h>
18#include <private/qv4script_p.h>
19#include <private/qv4scopedvalue_p.h>
20#include <private/qv4objectiterator_p.h>
21#include <private/qv4qobjectwrapper_p.h>
22#include <private/qv4jscall_p.h>
27#include <QThreadStorage>
28#include <QtCore/qdebug.h>
29#include <QtCore/qloggingcategory.h>
36 Q_CONSTINIT
thread_local int creationDepth = 0;
287 emit q->statusChanged(
q->status());
297 emit q->progressChanged(
p);
303 if (
auto cu =
data->compilationUnit())
334 qWarning(
"QQmlComponent: Must provide an engine before calling create");
358 propertyName,
o, ddata->outerContext);
359 if (propData && propData->isBindable())
360 creator->removePendingBinding(
o, propData->coreIndex());
407 const bool isValid = prop.
isValid();
408 if (isValid && privProp->writeValueProperty(
value, {})) {
420 "%2 does not have a property called %1")
446 if (
d->state.isCompletePending()) {
447 qWarning(
"QQmlComponent: Component destroyed while completion pending");
450 qWarning() <<
"This may have been caused by one of the following errors:";
456 if (
d->state.hasCreator())
461 d->typeData->unregisterCallback(
d);
489 else if (!
d->state.errors.isEmpty())
491 else if (
d->engine && (
d->compilationUnit ||
d->loadedType.isValid()))
687 d->compilationUnit.reset(compilationUnit);
704 qWarning(
"QQmlComponent: Must provide an engine before calling setData");
714 if (typeData->isCompleteOrError()) {
715 d->fromTypeData(typeData);
717 d->typeData = typeData;
718 d->typeData->registerCallback(
d);
733 if (!
d->creationContext.isNull())
734 return d->creationContext->asQQmlContext();
778 if (newUrl.isRelative()) {
785 QUrl fixedUrl(newUrl);
794 if (newUrl.isEmpty()) {
796 error.setDescription(QQmlComponent::tr(
"Invalid empty URL"));
811 if (
data->isCompleteOrError()) {
820 emit q->statusChanged(
q->status());
933 return d->createWithProperties(
nullptr, initialProperties,
context);
1024 if (!
state.
errors.isEmpty() && lcQmlComponentGeneral().isDebugEnabled()) {
1025 for (
const auto &e : std::as_const(
state.
errors)) {
1026 qCDebug(lcQmlComponentGeneral) <<
"QQmlComponent: " << e.error.toString();
1031 qWarning(
"QQmlComponent: Cannot create a component in a null context");
1036 qWarning(
"QQmlComponent: Cannot create a component in an invalid context");
1041 qWarning(
"QQmlComponent: Must create component in context from the same QQmlEngine");
1046 qWarning(
"QQmlComponent: Cannot create new component instance before completing the previous");
1052 state.
errors.removeIf([](
const auto &e) {
return e.isTransient; });
1055 if (!
q->isReady()) {
1056 qWarning(
"QQmlComponent: Component is not ready");
1061 static const int maxCreationDepth = 10;
1062 if (creationDepth >= maxCreationDepth) {
1063 qWarning(
"QQmlComponent: Component creation is recursing - aborting");
1099 if (parserStatusCast != -1) {
1100 parserStatus =
reinterpret_cast<QQmlParserStatus*
>(
reinterpret_cast<char *
>(rv) + parserStatusCast);
1103 for (
int i = 0, propertyCount = propertyCache->propertyCount();
i < propertyCount; ++
i) {
1104 if (
const QQmlPropertyData *propertyData = propertyCache->property(
i); propertyData->isRequired()) {
1107 info.propertyName = propertyData->name(rv);
1112 parserStatus->componentComplete();
1114 auto* hook =
reinterpret_cast<QQmlFinalizerHook *
>(
reinterpret_cast<char *
>(rv) + finalizerCast);
1124 ddata->indestructible =
true;
1125 ddata->explicitIndestructibleSet =
true;
1126 ddata->rootObjectInCreation =
false;
1136 Q_ASSERT(!ddata->deferredData.isEmpty());
1138 deferredState->reserve(ddata->deferredData.size());
1147 deferredData->context->parent(),
1148 deferredData->compilationUnit,
1149 QQmlRefPointer<QQmlContextData>());
1151 if (!
creator->populateDeferredProperties(
object, deferredData))
1153 deferredData->bindings.clear();
1155 deferredState->push_back(std::move(
state));
1210 if (targetProp->isAlias()) {
1211 auto target = createdComponent;
1217 targetProp =
data->propertyCache->property(propIndex.coreIndex());
1223 targetProp =
data->propertyCache->property(targetProp->coreIndex());
1225 auto it = requiredProperties->
constFind({createdComponent, targetProp});
1226 if (
it != requiredProperties->
cend()) {
1227 if (wasInRequiredProperties)
1228 *wasInRequiredProperties =
true;
1229 requiredProperties->
erase(
it);
1231 if (wasInRequiredProperties)
1232 *wasInRequiredProperties =
false;
1252 d->completeCreate();
1286 if (m_prev) *m_prev = m_next;
1287 if (m_next) m_next->m_prev = m_prev;
1304 if (
p->activeObjectCreator) {
1305 a->insertIntoList(
p->activeObjectCreator->componentAttachment());
1310 d->context->addComponentAttached(
a);
1346 auto loadHelper = QQml::makeRefPointer<LoadHelper>(&enginePriv->typeLoader, uri);
1348 return loadHelper->resolveType(
typeName);
1358 auto reportError = [&](
QString msg) {
1360 error.setDescription(msg);
1363 emit q->progressChanged(1);
1364 emit q->statusChanged(
q->Error);
1366 auto emitProgressReset = [&](){
1369 emit q->progressChanged(0);
1372 auto emitComplete = [&]() {
1374 emit q->progressChanged(1);
1375 emit q->statusChanged(
q->status());
1377 emitProgressReset();
1380 } else if (!
type.isValid()) {
1381 reportError(
QLatin1String(R
"(Module "%1" contains no type named "%2")")
1383 } else if (
type.isCreatable()) {
1387 }
else if (
type.isComposite()) {
1390 }
else if (
type.isInlineComponentType()) {
1407 realTypeName.truncate(realTypeName.indexOf(u
'.'));
1408 QString errorMessage = R
"(Type "%1" from module "%2" contains no inline component named "%3".)"_L1.arg(
1409 realTypeName, uri.toString(), elementName);
1410 if (elementName == u
"qml")
1411 errorMessage +=
" To load the type \"%1\", drop the \".qml\" extension."_L1.arg(realTypeName);
1417 }
else if (
type.isSingleton() ||
type.isCompositeSingleton()) {
1449 context =
d->engine->rootContext();
1452 QQmlRefPointer<QQmlContextData> forContextData =
1455 if (!contextData->isValid()) {
1456 qWarning(
"QQmlComponent: Cannot create a component in an invalid context");
1460 if (contextData->engine() !=
d->engine) {
1461 qWarning(
"QQmlComponent: Must create component in context from the same QQmlEngine");
1466 qWarning(
"QQmlComponent: Component is not ready");
1471 QExplicitlySharedDataPointer<QQmlIncubatorPrivate>
p(incubator.d);
1473 if (
d->loadedType.isValid()) {
1477 p->incubateCppBasedComponent(
this,
context);
1483 p->compilationUnit =
d->compilationUnit;
1484 p->enginePriv = enginePriv;
1485 p->creator.reset(
new QQmlObjectCreator(contextData,
d->compilationUnit,
d->creationContext,
p.data()));
1486 p->subComponentToCreate =
d->start;
1488 enginePriv->
incubate(incubator, forContextData);
1521 const QQmlRefPointer<QQmlContextData> &
context,
1522 const QQmlRefPointer<QQmlContextData> &forContext)
1528 incubatorPriv->compilationUnit = componentPriv->compilationUnit;
1529 incubatorPriv->enginePriv = enginePriv;
1530 incubatorPriv->creator.reset(
new QQmlObjectCreator(
context, componentPriv->compilationUnit, componentPriv->creationContext));
1533 if (
const QString *icName = componentPriv->inlineComponentName.get()) {
1538 incubatorPriv->subComponentToCreate = componentPriv->start;
1540 enginePriv->
incubate(*incubationTask, forContext);
1551#define QmlIncubatorObjectMembers(class, Member) \
1552 Member(class, HeapValue, HeapValue, valuemapOrObject) \
1553 Member(class, HeapValue, HeapValue, statusChanged) \
1554 Member(class, Pointer, QmlContext *, qmlContext) \
1555 Member(class, NoMark, QQmlComponentIncubator *, incubator) \
1556 Member(class, NoMark, QV4QPointer<QObject>, parent)
1562 inline void destroy();
1598 i->statusChanged(
s);
1605 i->setInitialState(
o,
d->requiredProperties());
1619 bool needParent =
false;
1620 for (
int ii = 0; ii < functions.size(); ++ii) {
1630 qmlWarning(me) <<
"Created graphical object was not placed in the graphics scene.";
1688 if (
engine->hasException)
1695 name =
it.nextPropertyNameAsString(val);
1700 bool isTopLevelProperty =
properties.size() == 1;
1703 object =
object->get(
name);
1704 if (
engine->hasException || !
object) {
1708 if (
engine->hasException) {
1722 object->put(
name, val);
1723 if (
engine->hasException) {
1726 }
else if (isTopLevelProperty && requiredProperties) {
1734 engine->hasException =
false;
1740 QString description =
QLatin1String(
"Required property %1 was not initialized").
arg(unsetRequiredProperty.propertyName);
1741 switch (unsetRequiredProperty.aliasesToRequired.size()) {
1745 const auto info = unsetRequiredProperty.aliasesToRequired.first();
1746 description +=
QLatin1String(
"\nIt can be set via the alias property %1 from %2\n").
arg(
info.propertyName,
info.fileUrl.toString());
1750 description +=
QLatin1String(
"\nIt can be set via one of the following alias properties:");
1751 for (
auto aliasInfo: unsetRequiredProperty.aliasesToRequired) {
1752 description +=
QLatin1String(
"\n- %1 (%2)").
arg(aliasInfo.propertyName, aliasInfo.fileUrl.toString());
1756 error.setDescription(description);
1757 error.setUrl(unsetRequiredProperty.fileUrl);
1758 error.setLine(qmlConvertSourceCoordinate<quint32, int>(
1759 unsetRequiredProperty.location.line()));
1760 error.setColumn(qmlConvertSourceCoordinate<quint32, int>(
1761 unsetRequiredProperty.location.column()));
1765#if QT_DEPRECATED_SINCE(6, 3)
1775 qmlWarning(
this) <<
"Unsuitable arguments passed to createObject(). The first argument should "
1776 "be a QObject* or null, and the second argument should be a JavaScript "
1777 "object or a QVariantMap";
1787 parent = qobjectWrapper->object();
1793 qmlWarning(
this) <<
tr(
"createObject: value is not an object");
1815 if (!valuemap->isUndefined()) {
1818 v4,
qmlContext,
object, valuemap,
d->state.requiredProperties(), rv,
1819 d->state.creator());
1821 if (
d->state.hasUnsetRequiredProperties()) {
1823 for (
const auto &requiredProperty:
std::as_const(*
d->
state.requiredProperties())) {
1832 d->completeCreate();
1838 args->setReturnValue(
object->asReturnedValue());
1934 parent = qobjectWrapper->object();
1941 qmlWarning(
this) <<
tr(
"createObject: value is not an object");
1962 r->setPrototypeOf(
p);
1964 if (!valuemap->isUndefined())
1965 r->d()->valuemapOrObject.set(scope.
engine, valuemap);
1975 args->setReturnValue(
r.asReturnedValue());
1988 if (!valuemap.isUndefined()) {
2024 o->d()->incubator->forceCompletion();
2056 o->d()->statusChanged.set(scope.
engine, argv[0]);
2071 qmlContext.set(internalClass->engine,
nullptr);
2075void QV4::Heap::QmlIncubatorObject::destroy() {
2085 if (!
d()->valuemapOrObject.isUndefined()) {
2091 v4, qmlCtxt,
obj,
d()->valuemapOrObject, requiredProperties,
o,
2100 QObject *
object =
d()->incubator->object();
2109 ddata->explicitIndestructibleSet =
false;
2110 ddata->indestructible =
false;
2116 *jsCallData.thisObject =
this;
2118 f->call(jsCallData);
2126 d()->incubator->incubatorObject.clear();
2129#undef INITIALPROPERTIES_SOURCE
2133#include "moc_qqmlcomponent.cpp"
2134#include "moc_qqmlcomponentattached_p.cpp"
QString toString() const
Returns a deep copy of this string view's data as a QString.
static bool isAbsolutePath(const QString &path)
Returns true if path is absolute; returns false if it is relative.
const_iterator constFind(const Key &key) const noexcept
iterator erase(const_iterator it)
const_iterator cend() const noexcept
QV4::ExecutionEngine * handle() const
QString arg(Args &&...args) const
void push_back(parameter_type t)
qsizetype length() const noexcept
reference emplaceBack(Args &&... args)
void reserve(qsizetype size)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
QQmlComponentAttached(QObject *parent=nullptr)
virtual ~QQmlComponentExtension()
QV4::PersistentValue incubationProto
QQmlComponentExtension(QV4::ExecutionEngine *v4)
void setInitialState(QObject *o) override
Called after the object is first created, but before complex property bindings are evaluated and,...
void statusChanged(Status s) override
Called when the status of the incubator changes.
QQmlComponentIncubator(QV4::Heap::QmlIncubatorObject *inc, IncubationMode mode)
QV4::PersistentValue incubatorObject
static void complete(QQmlEnginePrivate *enginePriv, ConstructionState *state)
virtual void incubateObject(QQmlIncubator *incubationTask, QQmlComponent *component, QQmlEngine *engine, const QQmlRefPointer< QQmlContextData > &context, const QQmlRefPointer< QQmlContextData > &forContext)
QQmlRefPointer< QV4::ExecutableCompilationUnit > compilationUnit
QObject * beginCreate(QQmlRefPointer< QQmlContextData >)
std::vector< ConstructionState > DeferredState
static QQmlError unsetRequiredPropertyToQQmlError(const RequiredPropertyInfo &unsetRequiredProperty)
std::unique_ptr< QString > inlineComponentName
bool hadTopLevelRequiredProperties() const
bool setInitialProperty(QObject *component, const QString &name, const QVariant &value)
void typeDataProgress(QQmlTypeData *, qreal) override
void completeLoadFromModule(QAnyStringView uri, QAnyStringView typeName, QQmlType type, LoadHelper::ResolveTypeResult::Status moduleStatus, QQmlComponent::CompilationMode mode=QQmlComponent::PreferSynchronous)
QObject * doBeginCreate(QQmlComponent *q, QQmlContext *context)
static QQmlComponentPrivate * get(QQmlComponent *c)
QObject * createWithProperties(QObject *parent, const QVariantMap &properties, QQmlContext *context, CreateBehavior behavior=CreateDefault)
LoadHelper::ResolveTypeResult prepareLoadFromModule(QAnyStringView uri, QAnyStringView typeName)
void typeDataReady(QQmlTypeData *) override
static void completeDeferred(QQmlEnginePrivate *enginePriv, DeferredState *deferredState)
static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, DeferredState *deferredState)
void loadUrl(const QUrl &newUrl, QQmlComponent::CompilationMode mode=QQmlComponent::PreferSynchronous)
QQmlGuardedContextData creationContext
void fromTypeData(const QQmlRefPointer< QQmlTypeData > &data)
static void setInitialProperties(QV4::ExecutionEngine *engine, QV4::QmlContext *qmlContext, const QV4::Value &o, const QV4::Value &v, RequiredProperties *requiredProperties, QObject *createdComponent, QQmlObjectCreator *creator)
\qmlmethod QtObject Component::createObject(QtObject parent, object properties)
void initializeObjectWithInitialProperties(QV4::QmlContext *qmlContext, const QV4::Value &valuemap, QObject *toCreate, RequiredProperties *requiredProperties)
QQmlRefPointer< QQmlTypeData > typeData
@ CreateWarnAboutRequiredProperties
static QQmlProperty removePropertyFromRequired(QObject *createdComponent, const QString &name, RequiredProperties *requiredProperties, QQmlEngine *engine, bool *wasInRequiredProperties=nullptr)
The QQmlComponent class encapsulates a QML component definition.
Status
\qmltype Component \instantiates QQmlComponent\inqmlmodule QtQml
bool isError() const
Returns true if status() == QQmlComponent::Error.
friend class QQmlObjectCreator
bool isBound() const
Returns true if the component was created in a QML files that specifies {pragma ComponentBehavior: Bo...
bool isNull() const
Returns true if status() == QQmlComponent::Null.
virtual QObject * beginCreate(QQmlContext *)
Create an object instance from this component, within the specified context.
bool isLoading() const
Returns true if status() == QQmlComponent::Loading.
static QQmlComponentAttached * qmlAttachedProperties(QObject *)
virtual void completeCreate()
This method provides advanced control over component instance creation.
void loadFromModule(QAnyStringView uri, QAnyStringView typeName, QQmlComponent::CompilationMode mode=PreferSynchronous)
Load the QQmlComponent for typeName in the module uri.
QQmlContext * creationContext() const
Returns the QQmlContext the component was created in.
void setInitialProperties(QObject *component, const QVariantMap &properties)
Set top-level properties of the component.
Status status
\qmlproperty enumeration Component::status
QList< QQmlError > errors() const
Returns the list of errors that occurred during the last compile or create operation.
Q_INVOKABLE QObject * createObject(QObject *parent=nullptr, const QVariantMap &properties={})
QUrl url
\qmlproperty url Component::url The component URL.
CompilationMode
Specifies whether the QQmlComponent should load the component immediately, or asynchonously.
qreal progress
\qmlproperty real Component::progress The progress of loading the component, from 0....
~QQmlComponent() override
Destruct the QQmlComponent.
bool isReady() const
Returns true if status() == QQmlComponent::Ready.
void setData(const QByteArray &, const QUrl &baseUrl)
Sets the QQmlComponent to use the given QML data.
void loadUrl(const QUrl &url)
Load the QQmlComponent from the provided url.
void progressChanged(qreal)
Emitted whenever the component's loading progress changes.
QQmlComponent(QObject *parent=nullptr)
Q_INVOKABLE void incubateObject(QQmlV4FunctionPtr)
\qmlmethod object Component::incubateObject(QtObject parent, object properties, enumeration mode)
QQmlEngine * engine() const
Returns the QQmlEngine of this component.
Q_INVOKABLE QString errorString() const
\qmlmethod string Component::errorString()
virtual QObject * create(QQmlContext *context=nullptr)
Create an object instance from this component, within the specified context.
QObject * createWithInitialProperties(const QVariantMap &initialProperties, QQmlContext *context=nullptr)
Create an object instance of this component, within the specified context, and initialize its top-lev...
void statusChanged(QQmlComponent::Status)
Emitted whenever the component's status changes.
static QQmlRefPointer< QQmlContextData > get(QQmlContext *context)
The QQmlContext class defines a context within a QML engine.
QQmlEngine * engine() const
Return the context's QQmlEngine, or \nullptr if the context has no QQmlEngine or the QQmlEngine was d...
static QQmlPropertyCache::ConstPtr ensurePropertyCache(QObject *object)
quint32 explicitIndestructibleSet
static QQmlData * get(QObjectPrivate *priv, bool create)
Q_REQUIRED_RESULT QQmlError removeError()
void warning(const QQmlError &)
void incubate(QQmlIncubator &, const QQmlRefPointer< QQmlContextData > &)
static QQmlEnginePrivate * get(QQmlEngine *e)
void referenceScarceResources()
QQmlDelayedError * erroredBindings
void dereferenceScarceResources()
The QQmlEngine class provides an environment for instantiating QML components.
QQmlContext * rootContext() const
Returns the engine's root context.
QUrl baseUrl() const
Return the base URL for this engine.
QQmlEngine * qmlEngine(const QObject *object)
Returns the QQmlEngine associated with object, if any.
The QQmlError class encapsulates a QML error.
QString description() const
Returns the error description.
int line() const
Returns the error line number.
QUrl url() const
Returns the url for the file that caused this error.
virtual void componentFinalized()=0
The customization point provided by this interface.
static QQmlIncubatorPrivate * get(QQmlIncubator *incubator)
The QQmlIncubator class allows QML objects to be created asynchronously.
void clear()
Clears the incubator.
IncubationMode
Specifies the mode the incubator operates in.
Status status() const
Return the current status of the incubator.
Status
Specifies the status of the QQmlIncubator.
bool finalize(QQmlInstantiationInterrupt &interrupt)
bool componentHadTopLevelRequiredProperties() const
QObject * create(int subComponentIndex=-1, QObject *parent=nullptr, QQmlInstantiationInterrupt *interrupt=nullptr, int flags=NormalObject)
The QQmlParserStatus class provides updates on the QML parser state.
virtual void classBegin()=0
Invoked after class creation, but before any properties have been set.
static void findAliasTarget(QObject *, QQmlPropertyIndex, QObject **, QQmlPropertyIndex *)
static QQmlPropertyPrivate * get(const QQmlProperty &p)
The QQmlProperty class abstracts accessing properties on objects created from QML.
bool isValid() const
Returns true if the QQmlProperty refers to a valid property, otherwise false.
int index() const
Return the Qt metaobject index of the property.
QML_ANONYMOUSQObject * object
void registerCallback(TypeDataCallback *)
void unregisterCallback(TypeDataCallback *)
QObject * createWithQQmlData() const
int finalizerCast() const
int parserStatusCast() const
Exception-safe wrapper around QObject::blockSignals().
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QByteArray toUtf8() const &
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
QUrl resolved(const QUrl &relative) const
Returns the result of the merge of this URL with relative.
void setFragment(const QString &fragment, ParsingMode mode=TolerantMode)
Sets the fragment of the URL to fragment.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
int inlineComponentId(const QString &inlineComponentName) const
ObjectType::Data * allocate(Args &&... args)
ExecutionEngine * engine() const
ReturnedValue value() const
void set(ExecutionEngine *engine, const Value &value)
void statusChanged(QQmlComponent::Status status)
[1]
QSet< QString >::iterator it
AutoParentResult(* AutoParentFunction)(QObject *object, QObject *parent)
Combined button and popup list for selecting options.
Scoped< FunctionObject > ScopedFunctionObject
Scoped< String > ScopedString
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLdouble GLdouble q
static qreal component(const QPointF &point, unsigned int i)
QQmlEngine * qmlEngine(const QObject *obj)
QQmlContext * qmlContext(const QObject *obj)
static void removePendingQPropertyBinding(QV4::Value *object, const QString &propertyName, QQmlObjectCreator *creator)
static void QQmlComponent_setQmlParent(QObject *me, QObject *parent)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
#define V4_DEFINE_EXTENSION(dataclass, datafunction)
#define DECLARE_HEAP_OBJECT(name, base)
#define DECLARE_MARKOBJECTS(class)
#define THROW_TYPE_ERROR()
#define RETURN_UNDEFINED()
#define DEFINE_OBJECT_VTABLE(classname)
#define V4_OBJECT2(DataClass, superClass)
QUrl url("example.com")
[constructor-url-reference]
someQObject blockSignals(wasBlocked)
QItemEditorCreatorBase * creator
\inmodule QtCore \reentrant
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 appendCreatorErrors()
QQmlObjectCreator * initCreator(QQmlRefPointer< QQmlContextData > parentContext, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QQmlRefPointer< QQmlContextData > &creationContext)
RequiredProperties * requiredProperties()
static constexpr ReturnedValue null()
MemoryManager * memoryManager
QQmlError catchExceptionAsQmlError()
Heap::Object * newObject()
Heap::String * newString(char16_t c)
QV4::ReturnedValue metaTypeToJS(QMetaType type, const void *data)
QQmlEngine * qmlEngine() const
static Heap::ExecutionContext * qmlContext(Heap::ExecutionContext *ctx)
QQmlRefPointer< ExecutableCompilationUnit > executableCompilationUnit(QQmlRefPointer< QV4::CompiledData::CompilationUnit > &&unit)
void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
void defineAccessorProperty(const QString &name, VTable::Call getter, VTable::Call setter)
static ReturnedValue wrap(ExecutionEngine *engine, QObject *object)
static ReturnedValue method_set_statusChanged(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_status(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static V4_NEEDS_DESTROY ReturnedValue method_get_statusChanged(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_object(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void statusChanged(QQmlIncubator::Status)
void setInitialState(QObject *, RequiredProperties *requiredProperties)
static ReturnedValue method_forceCompletion(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
bool hasException() const
static constexpr Value undefinedValue()
static Value fromUInt32(uint i)