6#include <QtQml/qqmlprivate.h>
8#include <private/qjsvalue_p.h>
9#include <private/qqmlengine_p.h>
10#include <private/qqmlmetatype_p.h>
11#include <private/qqmlmetatypedata_p.h>
12#include <private/qqmltype_p_p.h>
13#include <private/qqmltypemodule_p.h>
14#include <private/qqmlcomponent_p.h>
15#include <private/qqmltypewrapper_p.h>
16#include <private/qqmlvaluetypewrapper_p.h>
17#include <private/qv4lookup_p.h>
18#include <private/qv4qobjectwrapper_p.h>
19#include <private/qv4identifiertable_p.h>
20#include <private/qv4errorobject_p.h>
21#include <private/qqmlbuiltinfunctions_p.h>
22#include <private/qqmlfinalizer_p.h>
23#include <private/qqmlloggingcategory_p.h>
25#include <QtCore/qmutex.h>
54 || !
data->context->engine()
55 ||
data->deferredData.isEmpty()
56 ||
data->wasDeleted(
object)) {
66 data->releaseDeferredData();
81 return data->context->engine();
90 QObject *rv =
data->hasExtendedData() ?
data->attachedProperties()->value(pf) : 0;
97 data->attachedProperties()->insert(pf, rv);
140 const int id =
d->metaObject->metaCall(
156 <<
" is neither a default constructible QObject, nor a default- "
157 <<
"and copy-constructible Q_GADGET, nor marked as uncreatable.\n"
158 <<
"You should not use it as a QML type.";
162 <<
"Singleton" << metaType.
name()
163 <<
"needs either a default constructor or, when adding a default"
164 <<
"constructor is infeasible, a public static"
165 <<
"create(QQmlEngine *, QJSEngine *) method.";
170 <<
"is not a QObject, but has attached properties. This won't work.";
176 const char *uri,
int versionMajor,
177 int versionMinor,
const char *qmlName,
309 const char *
import,
int importMajor,
int importMinor)
329 const char *
import,
int importMajor,
int importMinor)
337int qmlTypeId(
const char *uri,
int versionMajor,
int versionMinor,
const char *qmlName)
347 "Ensure that it outlives the engine."));
355 "as the engine it was registered with"));
364#if QT_DEPRECATED_SINCE(6, 3)
373 "must only be accessed from one engine"));
378 alreadyCalled =
true;
394 error.setDescription(
QLatin1String(
"Singleton registered by registerSingletonInstance must only be accessed from one engine"));
407 const int propertyOffset =
metaObject->propertyOffset();
408 const int propertyCount =
metaObject->propertyCount();
409 for (
int coreIndex = propertyOffset, propertyEnd = propertyOffset + propertyCount;
410 coreIndex < propertyEnd; ++coreIndex) {
412 if (
int revision =
property.revision())
415 const int methodOffset =
metaObject->methodOffset();
416 const int methodCount =
metaObject->methodCount();
417 for (
int methodIndex = methodOffset, methodEnd = methodOffset + methodCount;
418 methodIndex < methodEnd; ++methodIndex) {
420 if (
int revision =
method.revision())
431template<
typename Registration>
446 revisions.append(added);
453 bool revisionsHaveMajorVersions =
false;
456 if (revision.hasMajorVersion()) {
457 revisionsHaveMajorVersions =
true;
458 if (revision.majorVersion() < defaultVersion.
majorVersion())
463 if (revisionsHaveMajorVersions) {
474 std::sort(revisions->
begin(), revisions->
end());
475 const auto it = std::unique(revisions->
begin(), revisions->
end());
495 const char *elementName = (
type.structVersion > 1 &&
type.forceAnonymous)
499 const bool creatable = (elementName !=
nullptr || isValueType)
507 classInfo(
type.classInfoMetaObject,
"QML.UncreatableReason"));
509 noCreateReason =
QLatin1String(
"Type cannot be created in QML.");
510 }
else if (isValueType) {
522 creatable ?
type.objectSize : 0,
526 type.createValueType,
531 type.attachedPropertiesFunction,
532 type.attachedPropertiesMetaObject,
533 type.parserStatusCast,
534 type.valueSourceCast,
535 type.valueInterceptorCast,
536 type.extensionObjectCreate,
537 type.extensionMetaObject,
540 type.structVersion > 0 ?
type.finalizerCast : -1,
555 type.classInfoMetaObject,
"QML.AddedInVersion",
558 type.classInfoMetaObject,
"QML.RemovedInVersion");
563 if (
type.attachedPropertiesMetaObject)
568 if (revision.hasMajorVersion() && revision.majorVersion() >
type.version.majorVersion())
574 if (typeRevision.
version < added
577 typeRevision.
create =
nullptr;
581 typeRevision.
create = creatable ?
type.create :
nullptr;
588 type.qmlTypeIds->append(
id);
596 type.qmlTypeIds->append(
id);
612 type.instanceMetaObject,
614 type.extensionObjectCreate,
615 type.extensionMetaObject,
620 type.classInfoMetaObject,
"QML.AddedInVersion",
623 type.classInfoMetaObject,
"QML.RemovedInVersion");
631 if (revision.hasMajorVersion() && revision.majorVersion() >
type.version.majorVersion())
637 if (revisionRegistration.
version < added
638 || (removed.
isValid() && !(revisionRegistration.
version < removed))) {
639 revisionRegistration.
typeName =
nullptr;
642 revisionRegistration.
typeName = elementName;
648 type.qmlTypeIds->append(
id);
666 type.classInfoMetaObject,
"QML.AddedInVersion",
669 type.classInfoMetaObject,
"QML.ExtraVersion");
674 if (revision < added)
676 if (revision.hasMajorVersion() && revision.majorVersion() >
type.version.majorVersion())
682 type.qmlTypeIds->append(
id);
712 return dtype.
index();
760 const char *uri,
int versionMajor,
int versionMinor,
763 return qmlRegisterUncreatableType<QQmlTypeNotAvailable>(
764 uri, versionMajor, versionMinor, qmlName,
message);
770 const char *uri,
int versionMajor,
const QMetaObject *classInfoMetaObject,
787 &QQmlTypeNotAvailable::staticMetaObject,
790 attachedPropertiesFunc<T>(),
791 attachedPropertiesMetaObject<T>(),
799 qmlCreateCustomParser<T>,
853 QObject *
object,
int coreIndex,
int notifyIndex,
bool isConstant,
860 capture->captureProperty(
object, coreIndex, notifyIndex);
871 capture->captureProperty(
object, propertyCache,
property);
877 if (
cache == ancestor)
885template<
bool StrictType = false>
904 const int coreIndex =
property->
coreIndex();
909 property->readProperty(
object,
target);
934 void *
a[] = {
target,
nullptr };
945 if (propType == QMetaType::fromType<QVariant>())
961 if (propType == QMetaType::fromType<QVariant>())
968template<
bool StrictType,
typename Op>
989template<
bool StrictType = false>
993 property->resetProperty(
object, {});
997template<
bool StrictType = false>
1001 property->writeProperty(
object,
value, {});
1005template<
typename Op>
1036 void *
args[] = {
nullptr };
1056 if (!foundMetaObject)
1059 while (foundMetaObject && foundMetaObject != typeMetaObject)
1060 foundMetaObject = foundMetaObject->
superClass();
1062 if (!foundMetaObject)
1065 if (propertyType == lookupType)
1074 switch (propertyType.
sizeOf()) {
1077 ? lookupType == QMetaType::fromType<quint8>()
1078 : lookupType == QMetaType::fromType<qint8>();
1081 ? lookupType == QMetaType::fromType<ushort>()
1082 : lookupType == QMetaType::fromType<short>();
1089 ? (lookupType == QMetaType::fromType<int>()
1090 || lookupType == QMetaType::fromType<uint>())
1091 : lookupType == QMetaType::fromType<int>();
1094 ? lookupType == QMetaType::fromType<qulonglong>()
1095 : lookupType == QMetaType::fromType<qlonglong>();
1099 }
else if (propertyType != lookupType) {
1110 if (propType == QMetaType::fromType<QVariant>())
1111 return storeObjectProperty<true>(l,
object,
variant);
1114 return resetObjectProperty<true>(l,
object);
1117 return storeObjectProperty<true>(l,
object,
variant->
data());
1121 return storeObjectProperty<true>(l,
object, converted.
data());
1134 if (propType == QMetaType::fromType<QVariant>())
1183 const bool doVariantLookup =
type == QMetaType::fromType<QVariant>();
1189 const int coreIndex =
metaObject->indexOfProperty(
1190 name->toQStringNoThrow().toUtf8().constData());
1205 return doVariantLookup
1217 return doVariantLookup
1227 const int coreIndex =
metaObject->indexOfProperty(
name.constData());
1239 const int missingLineNumber =
engine->currentStackFrame->missingLineNumber();
1240 const int lineNumber =
engine->currentStackFrame->lineNumber();
1241 Q_ASSERT(missingLineNumber != lineNumber);
1245 if (
it->line == missingLineNumber) {
1246 it->line = lineNumber;
1252 amendStackTrace(&
engine->exceptionStackTrace);
1257 amendStackTrace(
error->d()->stackTrace);
1314 capture->captureTranslation();
1319#if QT_CONFIG(translation)
1320 return QV4::GlobalExtensions::currentTranslationContext(
engine->
handle());
1340 return QMetaType::fromType<int>();
1345 return QMetaType::fromType<QObject *>();
1355 return metaObject->property(coreIndex).metaType();
1362 if (
type == QMetaType::fromType<QVariant>())
1364 if (
type == QMetaType::fromType<QJSValue>())
1366 if (
type == QMetaType::fromType<QJSPrimitiveValue>()) {
1425 switch (storeResult) {
1431 QStringLiteral(
"Value is null and could not be converted to an object"));
1452 = qobject_cast<QQmlLoggingCategory *>(
wrapper)) {
1455 if (!loggingCategory) {
1457 QStringLiteral(
"A QmlLoggingCatgory was provided without a valid name"));
1459 return loggingCategory;
1464 return qmlEngine() ? &lcQml() : &lcJs();
1498 int ctorIndex,
void *ctorArg)
const
1501 resultMetaType, resultMetaObject, ctorIndex, ctorArg);
1546 if (objectId != -1 && objectId < context->numIdValues())
1557 capture->captureProperty(
context->idValueBindings(objectId));
1570 const int propertyIdx =
context->propertyIndex(
name);
1571 if (propertyIdx == -1 || propertyIdx >=
context->numIdValues())
1596 QStringLiteral(
"Property '%1' of object [object Object] is not a function")
1620 QStringLiteral(
"Property '%1' of object [null] is not a function")
1677 Q_UNREACHABLE_RETURN(
false);
1726template<QmlContextPropertyGetter qmlContextPropertyGetter>
1735 =
context->qmlContext->imports()->query(
import).importNamespace) {
1738 scope.
engine,
nullptr,
context->qmlContext->imports(), importRef));
1755 ?
"%1 was a singleton at compile time, "
1756 "but is not a singleton anymore."
1757 :
"%1 was not a singleton at compile time, "
1758 "but is a singleton now.")
1768 initTypeWrapperLookup<QV4::QQmlContextWrapper::lookupSingleton>(
this, l, importNamespace);
1781 object,
wrapper->d()->type().attachedPropertiesFunction(
1802 if (!
type.isValid()) {
1839 initTypeWrapperLookup<QV4::QQmlContextWrapper::lookupType>(
this, l, importNamespace);
1846 const auto doThrow = [&]() {
1877 Q_UNREACHABLE_RETURN(
false);
1942 const bool isUnsigned
1979 const char *enumerator,
const char *enumValue)
const
1989 const int enumIndex =
metaObject->indexOfEnumerator(enumerator);
1998 const auto doThrow = [&]() {
2000 QStringLiteral(
"Value is null and could not be converted to an object"));
2029 Q_UNREACHABLE_RETURN(
false);
The QJSEngine class provides an environment for evaluating JavaScript code.
QV4::ExecutionEngine * handle() const
bool hasError() const
Returns true if the last JavaScript execution resulted in an exception or if throwError() was called.
static void setObjectOwnership(QObject *, ObjectOwnership)
Sets the ownership of object.
The QJSPrimitiveValue class operates on primitive types in JavaScript semantics.
static QJSValue fromReturnedValue(QV4::ReturnedValue d)
The QJSValue class acts as a container for Qt/JavaScript data types.
bool isUndefined() const
Returns true if this QJSValue is of the primitive type Undefined or if the managed value has been cle...
int toInt(bool *ok=nullptr, int base=10) const
iterator erase(const_iterator begin, const_iterator end)
void push_back(parameter_type t)
void append(parameter_type t)
bool isEnabled(QtMsgType type) const
Returns true if a message of type msgtype for the category should be shown; false otherwise.
const char * categoryName() const
Returns the name of the category.
void void Q_DECL_COLD_FUNCTION void warning(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a warning message specified with format msg.
void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void critical(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a critical message specified with format msg.
void void void info(const QLoggingCategory &cat, const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(3
Logs an informational message specified with format msg for the context cat.
void debug(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a debug message specified with format msg.
static QObjectPrivate * get(QObject *o)
QThread * thread() const
Returns the thread in which the object lives.
std::vector< ConstructionState > DeferredState
static void completeDeferred(QQmlEnginePrivate *enginePriv, DeferredState *deferredState)
static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, DeferredState *deferredState)
QQmlRefPointer< QQmlTypeNameCache > imports() const
QQmlEngine * engine() const
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 void flushPendingBinding(QObject *object, int coreIndex)
QQmlPropertyCache::ConstPtr propertyCache
bool hasPendingBindingBit(int index) const
static bool wasDeleted(const QObject *)
static QQmlData * get(QObjectPrivate *priv, bool create)
quint32 isQueuedForDeletion
QQmlPropertyCapture * propertyCapture
void warning(const QQmlError &)
QQmlTypeLoader typeLoader
static bool baseModulesUninitialized
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlEngine class provides an environment for instantiating QML components.
static QQmlContext * contextForObject(const QObject *)
Returns the QQmlContext for the object, or nullptr if no context has been set.
void qmlUnregisterModuleImport(const char *uri, int moduleMajor, const char *import, int importMajor, int importMinor)
Removes a module import previously registered with qmlRegisterModuleImport()
void qmlRegisterModuleImport(const char *uri, int moduleMajor, const char *import, int importMajor, int importMinor)
Registers a qmldir-import for module uri of major version moduleMajor.
The QQmlError class encapsulates a QML error.
const QQmlPropertyData * property(const K &key, QObject *object, const QQmlRefPointer< QQmlContextData > &context) const
QMetaType propType() const
static void removeBinding(const QQmlProperty &that)
QV4::ExecutableCompilationUnit * compilationUnit() const
QQmlRefPointer< QQmlTypeData > getType(const QUrl &unNormalizedUrl, Mode mode=PreferSynchronous)
Returns a QQmlTypeData for the specified url.
Result query(const QHashedStringRef &key) const
static QVariant constructValueType(QMetaType targetMetaType, const QMetaObject *targetMetaObject, int ctorIndex, void *ctorArg)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray toUtf8() const &
static constexpr QTypeRevision fromVersion(Major majorVersion, Minor minorVersion)
Produces a QTypeRevision from the given majorVersion and minorVersion, both of which need to be a val...
static constexpr QTypeRevision fromEncodedVersion(Integer value)
Produces a QTypeRevision from the given value.
constexpr bool hasMinorVersion() const
Returns true if the minor version is known, otherwise false.
static constexpr QTypeRevision zero()
Produces a QTypeRevision with major and minor version {0}.
static constexpr QTypeRevision fromMinorVersion(Minor minorVersion)
Produces a QTypeRevision from the given minorVersion with an invalid major version.
constexpr bool hasMajorVersion() const
Returns true if the major version is known, otherwise false.
constexpr quint8 minorVersion() const
Returns the minor version encoded in the revision.
static constexpr QTypeRevision fromMajorVersion(Major majorVersion)
Produces a QTypeRevision from the given majorVersion with an invalid minor version.
constexpr bool isValid() const
Returns true if the major version or the minor version is known, otherwise false.
constexpr quint8 majorVersion() const
Returns the major version encoded in the revision.
QV4::Lookup * runtimeLookups
void * data()
Returns a pointer to the contained object as a generic void* that can be written to.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
QMetaType metaType() const
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
ObjectPropertyResult loadFallbackAsVariant(QV4::Lookup *l, QObject *object, void *target, QQmlContextData *qmlContext)
static void initTypeWrapperLookup(const AOTCompiledContext *context, QV4::Lookup *l, uint importNamespace)
QTypeRevision revisionClassInfo(const QMetaObject *metaObject, const char *key, QTypeRevision defaultValue=QTypeRevision())
void Q_QML_EXPORT qmlunregister(RegistrationType, quintptr)
static ObjectPropertyResult storeFallbackProperty(QV4::Lookup *l, QObject *object, void *value)
static int indexOfOwnClassInfo(const QMetaObject *metaObject, const char *key, int startOffset=-1)
static void captureObjectProperty(QObject *object, const QQmlPropertyCache *propertyCache, const QQmlPropertyData *property, QQmlContextData *qmlContext)
static QQmlPropertyCapture * propertyCapture(const QQmlContextData *qmlContext)
static bool initValueLookup(QV4::Lookup *l, QV4::ExecutableCompilationUnit *compilationUnit, const QMetaObject *metaObject, QMetaType type)
static ObjectPropertyResult storeObjectAsVariant(QV4::ExecutionEngine *v4, QV4::Lookup *l, QObject *object, void *value)
ObjectPropertyResult loadObjectAsVariant(QV4::Lookup *l, QObject *object, void *target, QQmlContextData *qmlContext)
Q_QML_EXPORT void qmlRegistrationWarning(QmlRegistrationWarning warning, QMetaType type)
@ CompositeSingletonRegistration
@ SequentialContainerRegistration
@ SequentialContainerAndRevisionsRegistration
@ QmlUnitCacheHookRegistration
@ SingletonAndRevisionsRegistration
@ TypeAndRevisionsRegistration
QV4::ReturnedValue(*)(QV4::Lookup *l, QV4::ExecutionEngine *engine, QV4::Value *thisObject) QmlContextPropertyGetter
static ObjectPropertyResult storeFallbackAsVariant(QV4::ExecutionEngine *v4, QV4::Lookup *l, QObject *object, void *value)
static ObjectPropertyResult changeObjectProperty(QV4::Lookup *l, QObject *object, Op op)
Q_QML_EXPORT QList< QTypeRevision > revisionClassInfos(const QMetaObject *metaObject, const char *key)
static bool inherits(const QQmlPropertyCache *descendent, const QQmlPropertyCache *ancestor)
static ObjectLookupResult initObjectLookup(const AOTCompiledContext *aotContext, QV4::Lookup *l, QObject *object, QMetaType type)
static ObjectPropertyResult resetObjectProperty(QV4::Lookup *l, QObject *object)
ObjectPropertyResult loadObjectProperty(QV4::Lookup *l, QObject *object, void *target, QQmlContextData *qmlContext)
static bool isUndefined(const void *value, QMetaType type)
static void amendException(QV4::ExecutionEngine *engine)
@ UnconstructibleSingleton
Q_QML_EXPORT QObject * qmlExtendedObject(QObject *, int)
const CachedQmlUnit *(* QmlUnitCacheLookupFunction)(const QUrl &url)
static ObjectPropertyResult resetFallbackProperty(QV4::Lookup *l, QObject *object)
static void captureFallbackProperty(QObject *object, int coreIndex, int notifyIndex, bool isConstant, const QQmlContextData *qmlContext)
const char * classInfo(const QMetaObject *metaObject, const char *key)
static ObjectPropertyResult loadFallbackProperty(QV4::Lookup *l, QObject *object, void *target, QQmlContextData *qmlContext)
static bool isTypeCompatible(QMetaType lookupType, QMetaType propertyType)
bool boolClassInfo(const QMetaObject *metaObject, const char *key, bool defaultValue=false)
int Q_QML_EXPORT qmlregister(RegistrationType, void *)
AutoParentResult(* AutoParentFunction)(QObject *object, QObject *parent)
void qmlRegisterTypeAndRevisions< QQmlTypeNotAvailable, void >(const char *uri, int versionMajor, const QMetaObject *classInfoMetaObject, QVector< int > *qmlTypeIds, const QMetaObject *extension, bool)
static ObjectPropertyResult storeObjectProperty(QV4::Lookup *l, QObject *object, void *value)
const char * classElementName(const QMetaObject *metaObject)
static ObjectPropertyResult changeFallbackProperty(QV4::Lookup *l, QObject *object, Op op)
Combined button and popup list for selecting options.
void setupQObjectLookup(Lookup *lookup, const QQmlData *ddata, const QQmlPropertyData *propertyData)
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLsizei GLenum GLenum * types
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
bool qmlProtectModule(const char *uri, int majVersion)
int qmlTypeId(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)
QQmlAttachedPropertiesFunc qmlAttachedPropertiesFunction(QObject *object, const QMetaObject *attachedMetaObject)
int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &reason)
void qmlExecuteDeferred(QObject *object)
void assignVersions(Registration *registration, QTypeRevision revision, QTypeRevision defaultVersion)
QQmlEngine * qmlEngine(const QObject *obj)
static QVector< QTypeRevision > availableRevisions(const QMetaObject *metaObject)
int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &message)
QQmlContext * qmlContext(const QObject *obj)
static QObject * resolveAttachedProperties(QQmlAttachedPropertiesFunc pf, QQmlData *data, QObject *object, bool create)
QObject * qmlAttachedPropertiesObject(QObject *object, QQmlAttachedPropertiesFunc func, bool create)
static void uniqueRevisions(QVector< QTypeRevision > *revisions, QTypeRevision defaultVersion, QTypeRevision added)
void qmlClearTypeRegistrations()
static QQmlDirParser::Import resolveImport(const QString &uri, int importMajor, int importMinor)
QObject * qmlExtendedObject(QObject *object)
static bool checkSingletonInstance(QQmlEngine *engine, QObject *instance)
static QVector< QTypeRevision > prepareRevisions(const QMetaObject *metaObject, QTypeRevision added)
static QTypeRevision resolveModuleVersion(int moduleMajor)
@ QQmlModuleImportModuleAny
void qmlClearEnginePlugins()
QQmlPrivate::QQmlAttachedPropertiesFunc< QObject > QQmlAttachedPropertiesFunc
#define qUtf8Printable(string)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
unsigned long long quint64
QT_BEGIN_NAMESPACE typedef signed char qint8
obj metaObject() -> className()
void initLoadContextIdLookup(uint index) const
void captureTranslation() const
void initSetObjectLookup(uint index, QObject *object, QMetaType type) const
bool loadScopeObjectPropertyLookup(uint index, void *target) const
bool callGlobalLookup(uint index, void **args, const QMetaType *types, int argc) const
bool captureLookup(uint index, QObject *object) const
bool captureQmlContextPropertyLookup(uint index) const
QQmlContextData * qmlContext
void initSetValueLookup(uint index, const QMetaObject *metaObject, QMetaType type) const
void initCallObjectPropertyLookup(uint index) const
void initLoadScopeObjectPropertyLookup(uint index, QMetaType type) const
void initGetEnumLookup(uint index, const QMetaObject *metaObject, const char *enumerator, const char *enumValue) const
void setInstructionPointer(int offset) const
QJSValue jsMetaType(int index) const
bool loadAttachedLookup(uint index, QObject *object, void *target) const
void initLoadGlobalLookup(uint index) const
bool setObjectLookup(uint index, QObject *object, void *value) const
bool getObjectLookup(uint index, QObject *object, void *target) const
bool loadSingletonLookup(uint index, void *target) const
void initGetValueLookup(uint index, const QMetaObject *metaObject, QMetaType type) const
QVariant constructValueType(QMetaType resultMetaType, const QMetaObject *resultMetaObject, int ctorIndex, void *ctorArg) const
void initCallGlobalLookup(uint index) const
QMetaType lookupResultMetaType(uint index) const
bool callQmlContextPropertyLookup(uint index, void **args, const QMetaType *types, int argc) const
bool getEnumLookup(uint index, void *target) const
void writeToConsole(QtMsgType type, const QString &message, const QLoggingCategory *loggingCategory) const
QString translationContext() const
void initLoadSingletonLookup(uint index, uint importNamespace) const
void setReturnValueUndefined() const
QQmlEngine * qmlEngine() const
bool loadContextIdLookup(uint index, void *target) const
const QLoggingCategory * resolveLoggingCategory(QObject *wrapper, bool *ok) const
void storeNameSloppy(uint nameIndex, void *value, QMetaType type) const
bool callObjectPropertyLookup(uint index, QObject *object, void **args, const QMetaType *types, int argc) const
void initGetObjectLookup(uint index, QObject *object, QMetaType type) const
void initLoadAttachedLookup(uint index, uint importNamespace, QObject *object) const
bool getValueLookup(uint index, void *value, void *target) const
QJSValue javaScriptGlobalProperty(uint nameIndex) const
QV4::ExecutableCompilationUnit * compilationUnit
QObject * thisObject() const
bool loadGlobalLookup(uint index, void *target, QMetaType type) const
bool setValueLookup(uint index, void *target, void *value) const
void initLoadTypeLookup(uint index, uint importNamespace) const
void initCallQmlContextPropertyLookup(uint index) const
bool loadTypeLookup(uint index, void *target) const
QMetaSequence metaSequence
std::function< QObject *(QQmlEngine *, QJSEngine *)> qObjectApi
QQmlCustomParser * customParser
void(* create)(void *, void *)
QPointer< QObject > m_object
QObject * operator()(QQmlEngine *, QJSEngine *)
const QQmlImportRef * importNamespace
Heap::String ** runtimeStrings
Heap::InternalClass ** runtimeClasses
IdentifierTable * identifierTable
CppStackFrame * currentStackFrame
static bool metaTypeFromJS(const Value &value, QMetaType type, void *data)
ReturnedValue throwError(const Value &value)
QV4::ReturnedValue fromVariant(const QVariant &)
String * id_destroy() const
String * id_toString() const
QV4::ReturnedValue metaTypeToJS(QMetaType type, const void *data)
ReturnedValue throwTypeError()
ReturnedValue asReturnedValue() const
QString toQString() const
PropertyKey asPropertyKey(const Heap::String *str)
ReturnedValue(* globalGetter)(Lookup *l, ExecutionEngine *engine)
const QQmlPropertyData * propertyData
struct QV4::Lookup::@576::@611 qmlEnumValueLookup
struct QV4::Lookup::@576::@601 qobjectLookup
struct QV4::Lookup::@576::@606 qmlContextSingletonLookup
struct QV4::Lookup::@576::@604 qgadgetLookup
ReturnedValue encodedEnumValue
Heap::Base * qmlTypeWrapper
ReturnedValue(* qmlContextPropertyGetter)(Lookup *l, ExecutionEngine *engine, Value *thisObject)
static ReturnedValue getterQObject(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterQObjectAsVariant(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterQObjectAsVariant(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static bool setterQObject(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
ReturnedValue(* getter)(Lookup *l, ExecutionEngine *engine, const Value &object)
const QtPrivate::QMetaTypeInterface * metaType
struct QV4::Lookup::@576::@603 qobjectFallbackLookup
Heap::Base * singletonObject
static bool setterFallbackAsVariant(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
bool(* setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v)
static ReturnedValue getterFallback(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterFallbackAsVariant(Lookup *l, ExecutionEngine *engine, const Value &object)
void releasePropertyCache()
static bool setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
struct QV4::Lookup::@576::@607 qmlContextIdObjectLookup
struct QV4::Lookup::@576::@609 qmlTypeLookup
const QQmlPropertyCache * propertyCache
static ReturnedValue lookupAttached(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue wrap(ExecutionEngine *engine, QObject *object)
static ReturnedValue lookupSingleton(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupContextObjectProperty(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupIdObjectInParentContext(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupIdObject(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupScopeObjectProperty(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupScopeFallbackProperty(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue lookupType(Lookup *l, ExecutionEngine *engine, Value *base)
static ReturnedValue create(ExecutionEngine *, QObject *, const QQmlType &, Heap::QQmlTypeWrapper::TypeNameMode=Heap::QQmlTypeWrapper::IncludeEnums)
static ReturnedValue lookupEnumValue(Lookup *l, ExecutionEngine *engine, const Value &base)
static ReturnedValue lookupSingletonProperty(Lookup *l, ExecutionEngine *engine, const Value &base)
static bool lookupSetter(QV4::Lookup *l, QV4::ExecutionEngine *engine, QV4::Value &object, const QV4::Value &value)
static ReturnedValue lookupGetter(Lookup *lookup, ExecutionEngine *engine, const Value &object)
bool hasException() const