6#include <private/qqmlobjectorgadget_p.h> 
    7#include <private/qqmlengine_p.h> 
    8#include <private/qqmlvmemetaobject_p.h> 
    9#include <private/qqmlbinding_p.h> 
   10#include <private/qjsvalue_p.h> 
   11#include <private/qqmlexpression_p.h> 
   12#include <private/qqmlglobal_p.h> 
   13#include <private/qqmltypewrapper_p.h> 
   14#include <private/qqmlvaluetypewrapper_p.h> 
   15#include <private/qqmllistwrapper_p.h> 
   16#include <private/qqmlbuiltinfunctions_p.h> 
   18#include <private/qv4arraybuffer_p.h> 
   19#include <private/qv4functionobject_p.h> 
   20#include <private/qv4runtime_p.h> 
   21#include <private/qv4variantobject_p.h> 
   22#include <private/qv4identifiertable_p.h> 
   23#include <private/qv4lookup_p.h> 
   24#include <private/qv4qmlcontext_p.h> 
   25#include <private/qv4sequenceobject_p.h> 
   26#include <private/qv4objectproto_p.h> 
   27#include <private/qv4jsonobject_p.h> 
   28#include <private/qv4regexpobject_p.h> 
   29#include <private/qv4dateobject_p.h> 
   30#include <private/qv4scopedvalue_p.h> 
   31#include <private/qv4jscall_p.h> 
   32#include <private/qv4mm_p.h> 
   33#include <private/qqmlscriptstring_p.h> 
   34#include <private/qv4compileddata_p.h> 
   35#include <private/qqmlpropertybinding_p.h> 
   37#include <QtQml/qjsvalue.h> 
   38#include <QtCore/qjsonarray.h> 
   39#include <QtCore/qjsonobject.h> 
   40#include <QtCore/qjsonvalue.h> 
   41#include <QtCore/qvarlengtharray.h> 
   42#include <QtCore/qtimer.h> 
   43#include <QtCore/qatomic.h> 
   44#include <QtCore/qmetaobject.h> 
   45#if QT_CONFIG(qml_itemmodel) 
   46#include <QtCore/qabstractitemmodel.h> 
   48#include <QtCore/qloggingcategory.h> 
   49#include <QtCore/qqueue.h> 
   63using namespace 
Qt::StringLiterals;
 
   82    if (
value.isObject()) {
 
   87            return QObjectMethod::extractQtMethod(
function);
 
   91            return qMakePair(handler->object(), handler->signalIndex());
 
  101    Heap::ReferenceObject::Flags 
flags = Heap::ReferenceObject::NoFlag;
 
  103        if (stackFrame->v4Function->executableCompilationUnit()->valueTypesAreCopied())
 
  104            flags |= Heap::ReferenceObject::EnforcesLocation;
 
  108        flags |= Heap::ReferenceObject::CanWriteBack;
 
  120    const QMetaType propMetaType = 
property.propType();
 
  123        property.readProperty(
object, &rv);
 
  125            return QObjectWrapper::wrapConst(v4, rv);
 
  127            return QObjectWrapper::wrap(v4, rv);
 
  131        return QmlListWrapper::create(v4, 
object, 
property.coreIndex(), propMetaType);
 
  135    case QMetaType::Int: {
 
  137        property.readProperty(
object, &
v);
 
  140    case QMetaType::Bool: {
 
  142        property.readProperty(
object, &
v);
 
  145    case QMetaType::QString: {
 
  147        property.readProperty(
object, &
v);
 
  150    case QMetaType::UInt: {
 
  152        property.readProperty(
object, &
v);
 
  155    case QMetaType::Float: {
 
  157        property.readProperty(
object, &
v);
 
  160    case QMetaType::Double: {
 
  162        property.readProperty(
object, &
v);
 
  169    if (propMetaType == QMetaType::fromType<QJSValue>()) {
 
  171        property.readProperty(
object, &
v);
 
  179        property.readProperty(
object, &
v);
 
  187        qWarning(
"QMetaProperty::read: Unable to handle unregistered datatype '%s' for property " 
  188                 "'%s::%s'", 
p.typeName(), 
object->metaObject()->className(), 
p.name());
 
  189        return Encode::undefined();
 
  200            return QQmlValueTypeWrapper::create(
 
  201                        v4, 
nullptr, valueTypeMetaObject, propMetaType, 
wrapper,
 
  216    property.readProperty(
object, 
v.data());
 
  224    engine->functionPrototype()->defineDefaultProperty(
QStringLiteral(
"disconnect"), method_disconnect);
 
  260        } 
else if (
property->isV4Function()) {
 
  265            return QObjectMethod::create(
 
  267        } 
else if (
property->isSignalHandler()) {
 
  268            QmlSignalHandler::initProto(
engine);
 
  270                        object, 
property->coreIndex())->asReturnedValue();
 
  273            return QObjectMethod::create(
 
  298        index = QObjectMethod::DestroyMethod;
 
  300        index = QObjectMethod::ToStringMethod;
 
  312        QObject *qobj, 
bool *hasProperty = 
nullptr)
 
  325    if (
r.scriptIndex != -1) {
 
  327    } 
else if (
r.type.isValid()) {
 
  328        return OptionalReturnedValue(QQmlTypeWrapper::create(v4, qobj,
r.type, Heap::QQmlTypeWrapper::ExcludeEnums));
 
  329    } 
else if (
r.importNamespace) {
 
  331                                         v4, qobj, 
qmlContext->imports(), 
r.importNamespace,
 
  332                                         Heap::QQmlTypeWrapper::ExcludeEnums));
 
  337ReturnedValue QObjectWrapper::getQmlProperty(
 
  339        QObjectWrapper::Flags 
flags, 
bool *hasProperty)
 const 
  345            *hasProperty = 
false;
 
  346        return Encode::undefined();
 
  349    ExecutionEngine *v4 = 
engine();
 
  359        if ((
flags & IncludeImports) && 
name->startsWithUpper()) {
 
  362                return *importProperty;
 
  364        return Object::virtualGet(
this, 
name->propertyKey(), 
this, hasProperty);
 
  369    if ((
flags & CheckRevision) && 
result->hasRevision()) {
 
  372                *hasProperty = 
false;
 
  373            return Encode::undefined();
 
  390            *hasProperty = 
false;
 
  391        return Encode::null();
 
  402        if ((
flags & QObjectWrapper::CheckRevision) && 
result->hasRevision()) {
 
  406                    *hasProperty = 
false;
 
  407                return Encode::undefined();
 
  427            Object *proto = QObjectWrapper::defaultPrototype(
engine);
 
  428            return proto->get(
name, hasProperty);
 
  437    Scoped<QObjectWrapper> rewrapped(scope, 
wrap(
engine, 
object));
 
  440            *hasProperty = 
false;
 
  441        return Encode::null();
 
  447bool QObjectWrapper::setQmlProperty(
 
  459    if ((
flags & QObjectWrapper::CheckRevision) && 
result->hasRevision()) {
 
  469void QObjectWrapper::setProperty(
 
  482        if (!
f->isBinding()) {
 
  483            const bool isAliasToAllowed = [&]() {
 
  492                            = targetCache->
property(targetIndex.coreIndex());
 
  493                    object = targetObject;
 
  494                    property = targetProperty;
 
  495                    return targetProperty->
isVarProperty() || targetProperty->
propType() == QMetaType::fromType<QJSValue>();
 
  500            if (!isAliasToAllowed && !
property->isVarProperty()
 
  501                    && 
property->propType() != QMetaType::fromType<QJSValue>()) {
 
  523                if (
f->isBoundFunction()) {
 
  524                    auto boundFunction = 
static_cast<BoundFunction *
>(
f.getPointer());
 
  526                                                                           ctx, targetObject, targetIndex);
 
  529                                                           ctx, targetObject, targetIndex);
 
  532                void *argv = {&bindable};
 
  544                if (
f->isBoundFunction())
 
  553    if (
Q_UNLIKELY(lcBindingRemoval().isInfoEnabled())) {
 
  555            const auto stackFrame = 
engine->currentStackFrame;
 
  556            switch (binding->kind()) {
 
  558                const auto qmlBinding = 
static_cast<const QQmlBinding*
>(binding);
 
  560                       "Overwriting binding on %s::%s at %s:%d that was initially bound at %s",
 
  562                       qPrintable(stackFrame->source()), stackFrame->lineNumber(),
 
  563                       qPrintable(qmlBinding->expressionIdentifier()));
 
  569                       "Overwriting binding on %s::%s at %s:%d",
 
  571                       qPrintable(stackFrame->source()), stackFrame->lineNumber());
 
  587#define PROPERTY_STORE(cpptype, value) \ 
  591    void *argv[] = { &o, 0, &status, &flags }; \ 
  592    QMetaObject::metacall(object, QMetaObject::WriteProperty, property->coreIndex(), argv); 
  594    const QMetaType propType = 
property->propType();
 
  600    } 
else if (
value.isUndefined() && 
property->isResettable()) {
 
  601        void *
a[] = { 
nullptr };
 
  603    } 
else if (
value.isUndefined() && propType == QMetaType::fromType<QVariant>()) {
 
  605    } 
else if (
value.isUndefined() && propType == QMetaType::fromType<QJsonValue>()) {
 
  607    } 
else if (propType == QMetaType::fromType<QJSValue>()) {
 
  609    } 
else if (
value.isUndefined() && propType != QMetaType::fromType<QQmlScriptString>()) {
 
  611        if (!propType.
name())
 
  617    } 
else if (propType == QMetaType::fromType<int>() && 
value.isNumber()) {
 
  619    } 
else if (propType == QMetaType::fromType<qreal>() && 
value.isNumber()) {
 
  621    } 
else if (propType == QMetaType::fromType<float>() && 
value.isNumber()) {
 
  623    } 
else if (propType == QMetaType::fromType<double>() && 
value.isNumber()) {
 
  625    } 
else if (propType == QMetaType::fromType<QString>() && 
value.isString()) {
 
  627    } 
else if (
property->isVarProperty()) {
 
  631    } 
else if (propType == QMetaType::fromType<QQmlScriptString>()
 
  632               && (
value.isUndefined() || 
value.isPrimitive())) {
 
  634        if (
value.isNumber()) {
 
  637        } 
else if (
value.isString()) {
 
  638            ss.d->
script = CompiledData::Binding::escapedString(ss.d->
script);
 
  647            v = ExecutionEngine::toVariant(
value, propType);
 
  655            const char *targetTypeName = propType.
name();
 
  657                targetTypeName = 
"an unregistered type";
 
  675        return Encode::undefined();
 
  687        return rv->asReturnedValue();
 
  692        ScopedObject alternateWrapper(scope, (
Object *)
nullptr);
 
  694            alternateWrapper = 
engine->m_multiplyWrappedQObjects->value(
object);
 
  702            return result->asReturnedValue();
 
  705        if (!alternateWrapper) {
 
  707            if (!
engine->m_multiplyWrappedQObjects)
 
  708                engine->m_multiplyWrappedQObjects = 
new MultiplyWrappedQObjectMap;
 
  709            engine->m_multiplyWrappedQObjects->insert(
object, alternateWrapper->d());
 
  713        return alternateWrapper.asReturnedValue();
 
  726        constWrapper = 
engine->m_multiplyWrappedQObjects->value(constObject);
 
  730        constWrapper->setInternalClass(constWrapper->internalClass()->cryopreserved());
 
  731        if (!
engine->m_multiplyWrappedQObjects)
 
  732            engine->m_multiplyWrappedQObjects = 
new MultiplyWrappedQObjectMap;
 
  733        engine->m_multiplyWrappedQObjects->insert(constObject, constWrapper->d());
 
  737    return constWrapper.asReturnedValue();
 
  753        engine->m_multiplyWrappedQObjects->mark(
object, markStack);
 
  756        engine->m_multiplyWrappedQObjects->mark(
static_cast<const QObject *
>(
object), markStack);
 
  787        return qmlTypeWrapper->
object() == aobjectWrapper->
object();
 
  791    return bobjectWrapper && aobjectWrapper->
object() == bobjectWrapper->
object();
 
  799        if (
cache->callJSFactoryMethod(
object, 
args))
 
  808        return Object::virtualGet(
m, 
id, receiver, hasProperty);
 
  820        return Object::virtualPut(
m, 
id, 
value, receiver);
 
  847            return Object::virtualPut(
m, 
id, 
value, receiver);
 
  870                                qmlContext, 
n, IncludeImports | AttachMethods, &hasProperty);
 
  877    return Object::virtualGetOwnProperty(
m, 
id, 
p);
 
  882    int propertyIndex = 0;
 
  893    static const int destroyedIdx1 = QObject::staticMetaObject.indexOfSignal(
"destroyed(QObject*)");
 
  894    static const int destroyedIdx2 = QObject::staticMetaObject.indexOfSignal(
"destroyed()");
 
  895    static const int deleteLaterIdx = QObject::staticMetaObject.indexOfSlot(
"deleteLater()");
 
  903        const bool preventDestruction = 
mo->superClass() || 
mo == &QObject::staticMetaObject;
 
  904        const int propertyCount = 
mo->propertyCount();
 
  905        if (propertyIndex < propertyCount) {
 
  907            Scope scope(thatEngine);
 
  917                            thatEngine, that->d(), thatObject, &local,
 
  918                            QObjectWrapper::AttachMethods);
 
  920            return propName->toPropertyKey();
 
  922        const int methodCount = 
mo->methodCount();
 
  923        while (propertyIndex < propertyCount + methodCount) {
 
  924            Q_ASSERT(propertyIndex >= propertyCount);
 
  925            int index = propertyIndex - propertyCount;
 
  931            if (m_alreadySeen.contains(
method.name()))
 
  934                m_alreadySeen.insert(
method.name());
 
  936            Scope scope(thatEngine);
 
  944                            thatEngine, that->d(), thatObject, &local,
 
  945                            QObjectWrapper::AttachMethods);
 
  951    return ObjectOwnPropertyKeyIterator::next(
o, pd, 
attrs);
 
  963    PropertyKey id = 
engine->identifierTable->asPropertyKey(
engine->currentStackFrame->v4Function->compilationUnit->
 
  966        return Object::virtualResolveLookupGetter(
object, 
engine, lookup);
 
  976        return Encode::undefined();
 
  983        lookup->
getter = Lookup::getterQObjectMethod;
 
  984        return method.asReturnedValue();
 
  993                              lookup->
forCall ? NoFlag : AttachMethods)
 
  994                : Encode::undefined();
 
 1000        if (
name->startsWithUpper()) {
 
 1002                return *importProperty;
 
 1004        return Object::virtualResolveLookupGetter(
object, 
engine, lookup);
 
 1012        lookup->
getter = Lookup::getterQObjectMethod;
 
 1017    lookup->
getter = Lookup::getterQObject;
 
 1024    return Lookup::getterGeneric(l, 
engine, 
object);
 
 1030    return Object::virtualResolveLookupSetter(
object, 
engine, lookup, 
value);
 
 1053    const int id = 
metaObject->indexOfMethod(
"toString()");
 
 1059        if (
result.metaType() == QMetaType::fromType<QString>())
 
 1060            return result.toString();
 
 1063        return value->toQString();
 
 1069    QString objectName = 
object->objectName();
 
 1086    static void impl(
int which, QSlotObjectBase *this_, 
QObject *receiver, 
void **metaArgs, 
bool *
ret)
 
 1106            int argCount = 
storage.size();
 
 1113            for (
int ii = 0; ii < argCount; ++ii) {
 
 1115                if (
type == QMetaType::fromType<QVariant>()) {
 
 1122            f->call(jsCallData);
 
 1125                if (
error.description().isEmpty()) {
 
 1127                    error.setDescription(
QStringLiteral(
"Unknown exception occurred during evaluation of connected function: %1").
arg(
name->toQString()));
 
 1134                            << 
error.toString();
 
 1158            QObject *receiverToDisconnect = 
reinterpret_cast<QObject*
>(metaArgs[3]);
 
 1159            int slotIndexToDisconnect = *
reinterpret_cast<int*
>(metaArgs[4]);
 
 1161            if (slotIndexToDisconnect != -1) {
 
 1164                        (
connection->thisObject.isUndefined() || RuntimeHelpers::strictEqual(*
connection->thisObject.valueRef(), thisObject))) {
 
 1168                    if (connectedFunctionData.first == receiverToDisconnect &&
 
 1169                        connectedFunctionData.second == slotIndexToDisconnect) {
 
 1178                        (
connection->thisObject.isUndefined() || RuntimeHelpers::strictEqual(*
connection->thisObject.valueRef(), thisObject))) {
 
 1201    QObject *signalObject = signalInfo.first;
 
 1210    auto signalMetaMethod = signalObject->metaObject()->method(
signalIndex);
 
 1219    } 
else if (argc >= 2) {
 
 1231    slot->
signal = signalMetaMethod;
 
 1243    if (
QObject *receiver = functionData.first) {
 
 1247               "Could not find receiver of the connection, using sender as receiver. Disconnect " 
 1248               "explicitly (or delete the sender) to make sure the connection is removed.");
 
 1263    QObject *signalObject = signalInfo.first;
 
 1270        THROW_GENERIC_ERROR(
"Function.prototype.disconnect: cannot disconnect from deleted QObject");
 
 1276    ScopedValue functionThisValue(scope, Encode::undefined());
 
 1279        functionValue = argv[0];
 
 1280    } 
else if (argc >= 2) {
 
 1281        functionThisValue = argv[0];
 
 1282        functionValue = argv[1];
 
 1296        functionThisValue.
ptr,
 
 1298        &functionData.second
 
 1301    if (
QObject *receiver = functionData.first) {
 
 1303                                   reinterpret_cast<void **
>(&
a));
 
 1306                                   reinterpret_cast<void **
>(&
a));
 
 1317    while (!
queue.isEmpty()) {
 
 1321        QObjectWrapper::markWrapper(
child, markStack);
 
 1333            vme->
mark(markStack);
 
 1343    Object::markObjects(that, markStack);
 
 1346void QObjectWrapper::destroyObject(
bool lastCall)
 
 1386template<
typename A, 
typename B, 
typename C, 
typename D, 
typename E, 
typename F, 
typename G>
 
 1388    template<
typename Z, 
typename X>
 
 1390        char dummy[
sizeof(Z) > 
sizeof(
X) ? 
sizeof(Z) : sizeof(
X)];
 
 1393    static const size_t Size = 
sizeof(SMax<A, SMax<B, SMax<C, SMax<D, SMax<E, SMax<F, G> > > > > >);
 
 1396struct CallArgument {
 
 1397    Q_DISABLE_COPY_MOVE(CallArgument);
 
 1399    CallArgument() = 
default;
 
 1400    ~CallArgument() { cleanup(); }
 
 1402    inline void *dataPtr();
 
 1405    inline bool fromValue(
QMetaType type, ExecutionEngine *, 
const Value &);
 
 1411    enum { QVariantWrappedType = -1 };
 
 1413    inline void cleanup();
 
 1415    template <
class T, 
class M>
 
 1416    bool fromContainerValue(
const Value &
object, 
M CallArgument::*member);
 
 1424        std::vector<int> *stdVectorIntPtr;
 
 1425        std::vector<qreal> *stdVectorRealPtr;
 
 1426        std::vector<bool> *stdVectorBoolPtr;
 
 1427        std::vector<QString> *stdVectorQStringPtr;
 
 1428        std::vector<QUrl> *stdVectorQUrlPtr;
 
 1429#if QT_CONFIG(qml_itemmodel) 
 1430        std::vector<QModelIndex> *stdVectorQModelIndexPtr;
 
 1433        char allocData[MaxSizeOf7<
QVariant,
 
 1466        args[0].initAsType(returnType);
 
 1467        for (
int ii = 0; ii < argCount; ++ii) {
 
 1468            if (!
args[ii + 1].fromValue(argTypes[ii], 
engine,
 
 1480                const bool is_signal =
 
 1483                    qWarning() << 
"Passing incompatible arguments to signals is not supported.";
 
 1485                    return engine->throwTypeError(
 
 1486                            QLatin1String(
"Passing incompatible arguments to C++ functions from " 
 1487                            "JavaScript is not allowed."));
 
 1492        for (
int ii = 0; ii < 
args.
size(); ++ii)
 
 1493            argData[ii] = 
args[ii].dataPtr();
 
 1495        object.metacall(callType, 
index, argData.
data());
 
 1499    } 
else if (returnType != QMetaType::fromType<void>()) {
 
 1502        arg.initAsType(returnType);
 
 1504        void *
args[] = { 
arg.dataPtr() };
 
 1512        void *
args[] = { 
nullptr };
 
 1514        return Encode::undefined();
 
 1519template<
typename Retrieve>
 
 1521    if (conversionMetaType == QMetaType::fromType<QVariant>())
 
 1525    if (
type == conversionMetaType)
 
 1547    const int conversionType = conversionMetaType.
id();
 
 1549        switch (conversionType) {
 
 1550        case QMetaType::Double:
 
 1552        case QMetaType::Float:
 
 1554        case QMetaType::LongLong:
 
 1555        case QMetaType::ULongLong:
 
 1557        case QMetaType::Long:
 
 1558        case QMetaType::ULong:
 
 1560        case QMetaType::Int:
 
 1561        case QMetaType::UInt:
 
 1563        case QMetaType::Short:
 
 1564        case QMetaType::UShort:
 
 1567        case QMetaType::Char:
 
 1568        case QMetaType::UChar:
 
 1570        case QMetaType::QJsonValue:
 
 1576        switch (conversionType) {
 
 1577        case QMetaType::QString:
 
 1579        case QMetaType::QJsonValue:
 
 1581        case QMetaType::QUrl:
 
 1587        switch (conversionType) {
 
 1588        case QMetaType::Bool:
 
 1590        case QMetaType::QJsonValue:
 
 1596        switch (conversionType) {
 
 1597        case QMetaType::QDateTime:
 
 1599        case QMetaType::QDate:
 
 1601        case QMetaType::QTime:
 
 1607        switch (conversionType) {
 
 1608#if QT_CONFIG(regularexpression) 
 1609        case QMetaType::QRegularExpression:
 
 1616        switch (conversionType) {
 
 1617        case QMetaType::QByteArray:
 
 1623        switch (conversionType) {
 
 1624        case QMetaType::QJsonArray:
 
 1626        case QMetaType::QStringList:
 
 1627        case QMetaType::QVariantList:
 
 1629        case QMetaType::QVector4D:
 
 1630        case QMetaType::QMatrix4x4:
 
 1632        case QMetaType::QVector3D:
 
 1637    } 
else if (actual.
isNull()) {
 
 1638        switch (conversionType) {
 
 1639        case QMetaType::Nullptr:
 
 1640        case QMetaType::VoidStar:
 
 1641        case QMetaType::QObjectStar:
 
 1642        case QMetaType::QJsonValue:
 
 1653            return MatchVariant(conversionMetaType, [variantObject]() {
 
 1654                return variantObject->d()->
data().metaType();
 
 1659            switch (conversionType) {
 
 1660            case QMetaType::QObjectStar:
 
 1676            if (
type.isSingleton()) {
 
 1678                if (metaType == conversionMetaType)
 
 1683                    && 
type.metaObject()->inherits(conversionMetaType.
metaObject())) {
 
 1697            if (SequencePrototype::metaTypeForSequence(sequence) == conversionMetaType)
 
 1705                return wrapper->d()->isVariant()
 
 1706                           ? 
wrapper->toVariant().metaType()
 
 1711        if (conversionType == QMetaType::QJsonObject)
 
 1713        if (conversionType == qMetaTypeId<QJSValue>())
 
 1715        if (conversionType == QMetaType::QVariantMap)
 
 1738    QMetaType returnType = 
object.methodReturnType(
data, &unknownTypeError);
 
 1745    auto handleTooManyArguments = [&](
int expectedArguments) {
 
 1747        const int indexOfClassInfo = 
metaObject->indexOfClassInfo(
"QML.StrictArguments");
 
 1748        if (indexOfClassInfo != -1
 
 1755        const auto stackTrace = 
engine->stackTrace();
 
 1756        if (stackTrace.isEmpty()) {
 
 1758                    << 
"When matching arguments for " 
 1759                    << 
object.className() << 
"::" << 
data.name(
object.
metaObject()) << 
"():";
 
 1768                                        .arg(callArgs->
argc() - expectedArguments);
 
 1774    if (
data.hasArguments()) {
 
 1779        if (
data.isConstructor())
 
 1780            ok = 
object.constructorParameterTypes(
data.coreIndex(), &
storage, &unknownTypeError);
 
 1782            ok = 
object.methodParameterTypes(
data.coreIndex(), &
storage, &unknownTypeError);
 
 1794        if (
storage.size() < definedArgumentCount) {
 
 1795            if (!handleTooManyArguments(
storage.size()))
 
 1796                return Encode::undefined();
 
 1803        if (definedArgumentCount > 0 && !handleTooManyArguments(0))
 
 1804            return Encode::undefined();
 
 1806        return CallMethod(
object, 
data.coreIndex(), returnType, 0, 
nullptr, 
engine, callArgs, callType);
 
 1827    const int argumentCount = callArgs->
argc();
 
 1831    int bestParameterScore = INT_MAX;
 
 1832    int bestMaxMatchScore = INT_MAX;
 
 1833    int bestSumMatchScore = INT_MAX;
 
 1838    for (
int i = 0; 
i < methodCount; ++
i) {
 
 1841        if (lcOverloadResolution().isDebugEnabled()) {
 
 1844                                  ? 
object.metaObject()->constructor(candidate.
coreIndex())
 
 1845                                  : 
object.metaObject()->method(candidate.
coreIndex());
 
 1846            qCDebug(lcOverloadResolution) << 
"::: considering signature" << 
m.methodSignature();
 
 1850        int methodParameterScore = 1;
 
 1852        int maxMethodMatchScore = 9;
 
 1854        int sumMethodMatchScore = bestSumMatchScore;
 
 1858            int methodArgumentCount = 0;
 
 1861                    if (!
object.constructorParameterTypes(attempt->
coreIndex(), &
storage, 
nullptr)) {
 
 1862                        qCDebug(lcOverloadResolution, 
"rejected, could not get ctor argument types");
 
 1866                    if (!
object.methodParameterTypes(attempt->
coreIndex(), &
storage, 
nullptr)) {
 
 1867                        qCDebug(lcOverloadResolution, 
"rejected, could not get ctor argument types");
 
 1871                methodArgumentCount = 
storage.size();
 
 1874            if (methodArgumentCount > argumentCount) {
 
 1875                qCDebug(lcOverloadResolution, 
"rejected, insufficient arguments");
 
 1879            methodParameterScore = (definedArgumentCount == methodArgumentCount)
 
 1881                    : (definedArgumentCount - methodArgumentCount + 1);
 
 1882            if (methodParameterScore > bestParameterScore) {
 
 1883                qCDebug(lcOverloadResolution) << 
"rejected, score too bad. own" << methodParameterScore << 
"vs best:" << bestParameterScore;
 
 1887            maxMethodMatchScore = 0;
 
 1888            sumMethodMatchScore = 0;
 
 1889            for (
int ii = 0; ii < methodArgumentCount; ++ii) {
 
 1890                const int score = 
MatchScore((
v = Value::fromStaticValue(callArgs->
args[ii])),
 
 1892                maxMethodMatchScore = 
qMax(maxMethodMatchScore, score);
 
 1893                sumMethodMatchScore += score;
 
 1897        if (bestParameterScore > methodParameterScore || bestMaxMatchScore > maxMethodMatchScore
 
 1898                || (bestParameterScore == methodParameterScore
 
 1899                    && bestMaxMatchScore == maxMethodMatchScore
 
 1900                    && bestSumMatchScore > sumMethodMatchScore)) {
 
 1902            bestParameterScore = methodParameterScore;
 
 1903            bestMaxMatchScore = maxMethodMatchScore;
 
 1904            bestSumMatchScore = sumMethodMatchScore;
 
 1905            qCDebug(lcOverloadResolution) << 
"updated best" << 
"bestParameterScore" << bestParameterScore  << 
"\n" 
 1906                                          << 
"bestMaxMatchScore" << bestMaxMatchScore  << 
"\n" 
 1907                                          << 
"bestSumMatchScore" << bestSumMatchScore  << 
"\n";
 
 1909            qCDebug(lcOverloadResolution) << 
"did not update best\n" 
 1910                                          << 
"bestParameterScore" << bestParameterScore << 
"\t" 
 1911                                          << 
"methodParameterScore" << methodParameterScore << 
"\n" 
 1912                                          << 
"bestMaxMatchScore" << bestMaxMatchScore << 
"\t" 
 1913                                          << 
"maxMethodMatchScore" << maxMethodMatchScore << 
"\n" 
 1914                                          << 
"bestSumMatchScore" << bestSumMatchScore << 
"\t" 
 1915                                          << 
"sumMethodMatchScore" << sumMethodMatchScore << 
"\n";
 
 1918        if (bestParameterScore == 0 && bestMaxMatchScore == 0) {
 
 1919            qCDebug(lcOverloadResolution, 
"perfect match");
 
 1925    if (best && best->
isValid()) {
 
 1929        for (
int i = 0; 
i < methodCount; ++
i) {
 
 1930            for (
int i = 0; 
i < methodCount; ++
i) {
 
 1933                                      ? 
object.metaObject()->constructor(candidate.
coreIndex())
 
 1934                                      : 
object.metaObject()->method(candidate.
coreIndex());
 
 1946void CallArgument::cleanup()
 
 1949    case QMetaType::QString:
 
 1950        qstringPtr->~QString();
 
 1952    case QMetaType::QByteArray:
 
 1953        qbyteArrayPtr->~QByteArray();
 
 1956    case QVariantWrappedType:
 
 1957        qvariantPtr->~QVariant();
 
 1959    case QMetaType::QJsonArray:
 
 1960        jsonArrayPtr->~QJsonArray();
 
 1962    case QMetaType::QJsonObject:
 
 1963        jsonObjectPtr->~QJsonObject();
 
 1965    case QMetaType::QJsonValue:
 
 1966        jsonValuePtr->~QJsonValue();
 
 1969        if (
type == qMetaTypeId<QJSValue>()) {
 
 1970            qjsValuePtr->~QJSValue();
 
 1975            qlistPtr->~QList<
QObject *>();
 
 1985void *CallArgument::dataPtr()
 
 1990    case QVariantWrappedType:
 
 1991        return qvariantPtr->data();
 
 1994            return stdVectorIntPtr;
 
 1996            return stdVectorRealPtr;
 
 1998            return stdVectorBoolPtr;
 
 2000            return stdVectorQStringPtr;
 
 2002            return stdVectorQUrlPtr;
 
 2003#if QT_CONFIG(qml_itemmodel) 
 2005            return stdVectorQModelIndexPtr;
 
 2010    return (
void *)&allocData;
 
 2013void CallArgument::initAsType(
QMetaType metaType)
 
 2020    case QMetaType::Void:
 
 2024    case QMetaType::Int:
 
 2025    case QMetaType::UInt:
 
 2026    case QMetaType::Bool:
 
 2027    case QMetaType::Double:
 
 2028    case QMetaType::Float:
 
 2030    case QMetaType::QObjectStar:
 
 2031        qobjectPtr = 
nullptr;
 
 2033    case QMetaType::QString:
 
 2034        qstringPtr = 
new (&allocData) 
QString();
 
 2037        qvariantPtr = 
new (&allocData) 
QVariant();
 
 2039    case QMetaType::QJsonArray:
 
 2040        jsonArrayPtr = 
new (&allocData) 
QJsonArray();
 
 2042    case QMetaType::QJsonObject:
 
 2045    case QMetaType::QJsonValue:
 
 2046        jsonValuePtr = 
new (&allocData) 
QJsonValue();
 
 2049        if (metaType == QMetaType::fromType<QJSValue>()) {
 
 2050            qjsValuePtr = 
new (&allocData) 
QJSValue();
 
 2059        type = QVariantWrappedType;
 
 2060        qvariantPtr = 
new (&allocData) 
QVariant(metaType, (
void *)
nullptr);
 
 2066template <
class T, 
class M>
 
 2067bool CallArgument::fromContainerValue(
const Value &
value, 
M CallArgument::*member)
 
 2069    if (
const Sequence *sequence = 
value.as<Sequence>()) {
 
 2072            (this->*member) = 
ptr;
 
 2076    (this->*member) = 
nullptr;
 
 2088    case QMetaType::Int:
 
 2091    case QMetaType::UInt:
 
 2094    case QMetaType::Bool:
 
 2097    case QMetaType::Double:
 
 2098        doubleValue = double(
value.toNumber());
 
 2100    case QMetaType::Float:
 
 2101        floatValue = float(
value.toNumber());
 
 2103    case QMetaType::QString:
 
 2104        if (
value.isNullOrUndefined())
 
 2105            qstringPtr = 
new (&allocData) 
QString();
 
 2107            qstringPtr = 
new (&allocData) 
QString(
value.toQStringNoThrow());
 
 2109    case QMetaType::QObjectStar:
 
 2110        if (
const QObjectWrapper *qobjectWrapper = 
value.as<QObjectWrapper>()) {
 
 2111            qobjectPtr = qobjectWrapper->object();
 
 2115        if (
const QQmlTypeWrapper *qmlTypeWrapper = 
value.as<QQmlTypeWrapper>()) {
 
 2116            if (qmlTypeWrapper->isSingleton()) {
 
 2120            } 
else if (
QObject *
obj = qmlTypeWrapper->object()) {
 
 2132        qobjectPtr = 
nullptr;
 
 2133        return value.isNullOrUndefined(); 
 
 2137    case QMetaType::QJsonArray: {
 
 2140        jsonArrayPtr = 
new (&allocData) 
QJsonArray(JsonObject::toJsonArray(
a));
 
 2143    case  QMetaType::QJsonObject: {
 
 2146        jsonObjectPtr = 
new (&allocData) 
QJsonObject(JsonObject::toJsonObject(
o));
 
 2149    case QMetaType::QJsonValue:
 
 2150        jsonValuePtr = 
new (&allocData) 
QJsonValue(JsonObject::toJsonValue(
value));
 
 2152    case QMetaType::Void:
 
 2158        if (
type == qMetaTypeId<QJSValue>()) {
 
 2159            qjsValuePtr = 
new (&allocData) 
QJSValue;
 
 2169                Scoped<QObjectWrapper> qobjectWrapper(scope);
 
 2174                    qobjectWrapper = 
array->get(ii);
 
 2175                    if (!!qobjectWrapper)
 
 2176                        o = qobjectWrapper->object();
 
 2177                    qlistPtr->append(
o);
 
 2182            if (
const QObjectWrapper *qobjectWrapper = 
value.as<QObjectWrapper>()) {
 
 2183                qlistPtr->append(qobjectWrapper->object());
 
 2187            if (
const QmlListWrapper *listWrapper = 
value.as<QmlListWrapper>()) {
 
 2192            qlistPtr->
append(
nullptr);
 
 2193            return value.isNullOrUndefined();
 
 2198            if (
value.isNullOrUndefined()) {
 
 2199                qvariantPtr = 
new (&allocData) 
QVariant(metaType, 
nullptr);
 
 2206            if (fromContainerValue<std::vector<int>>(
value, &CallArgument::stdVectorIntPtr))
 
 2209            if (fromContainerValue<std::vector<qreal>>(
value, &CallArgument::stdVectorRealPtr))
 
 2212            if (fromContainerValue<std::vector<bool>>(
value, &CallArgument::stdVectorBoolPtr))
 
 2215            if (fromContainerValue<std::vector<QString>>(
value, &CallArgument::stdVectorQStringPtr))
 
 2218            if (fromContainerValue<std::vector<QUrl>>(
value, &CallArgument::stdVectorQUrlPtr))
 
 2220#if QT_CONFIG(qml_itemmodel) 
 2222            if (fromContainerValue<std::vector<QModelIndex>>(
 
 2223                        value, &CallArgument::stdVectorQModelIndexPtr)) {
 
 2232    qvariantPtr = 
new (&allocData) 
QVariant(metaType);
 
 2233    type = QVariantWrappedType;
 
 2235    if (ExecutionEngine::metaTypeFromJS(
value, metaType, qvariantPtr->data()))
 
 2245    case QMetaType::Int:
 
 2246        return Encode(
int(intValue));
 
 2247    case QMetaType::UInt:
 
 2248        return Encode((
uint)intValue);
 
 2249    case QMetaType::Bool:
 
 2250        return Encode(boolValue);
 
 2251    case QMetaType::Double:
 
 2252        return Encode(doubleValue);
 
 2253    case QMetaType::Float:
 
 2254        return Encode(floatValue);
 
 2255    case QMetaType::QString:
 
 2256        return Encode(
engine->newString(*qstringPtr));
 
 2257    case QMetaType::QByteArray:
 
 2258        return Encode(
engine->newArrayBuffer(*qbyteArrayPtr));
 
 2259    case QMetaType::QObjectStar:
 
 2262        return QObjectWrapper::wrap(
engine, qobjectPtr);
 
 2263    case QMetaType::QJsonArray:
 
 2264        return JsonObject::fromJsonArray(
engine, *jsonArrayPtr);
 
 2265    case QMetaType::QJsonObject:
 
 2266        return JsonObject::fromJsonObject(
engine, *jsonObjectPtr);
 
 2267    case QMetaType::QJsonValue:
 
 2268        return JsonObject::fromJsonValue(
engine, *jsonValuePtr);
 
 2270    case QVariantWrappedType: {
 
 2272        ScopedValue rv(scope, scope.engine->fromVariant(*qvariantPtr));
 
 2273        Scoped<QObjectWrapper> qobjectWrapper(scope, rv);
 
 2274        if (!!qobjectWrapper) {
 
 2275            if (
QObject *
object = qobjectWrapper->object())
 
 2278        return rv->asReturnedValue();
 
 2284    if (
type == qMetaTypeId<QJSValue>()) {
 
 2297        ScopedValue 
v(scope);
 
 2298        for (
int ii = 0; ii < 
list.
size(); ++ii)
 
 2301        return array.asReturnedValue();
 
 2304    return Encode::undefined();
 
 2309    Scope valueScope(scope);
 
 2313    return method.asReturnedValue();
 
 2318    Scope valueScope(scope);
 
 2322    return method.asReturnedValue();
 
 2327        Heap::Object *
wrapper, Heap::Object *
object)
 
 2332    if (cloneFrom->wrapper) {
 
 2335            valueTypeWrapper = QQmlValueTypeWrapper::create(
engine, 
ref->d(), 
wrapper);
 
 2340            return Encode::undefined();
 
 2348                    context, valueTypeWrapper ? valueTypeWrapper->d() : 
object, cloneFrom->index));
 
 2350    method->d()->methodCount = cloneFrom->methodCount;
 
 2353    switch (cloneFrom->methodCount) {
 
 2355        Q_ASSERT(cloneFrom->methods == 
nullptr);
 
 2361        *
method->d()->methods = *cloneFrom->methods;
 
 2364        Q_ASSERT(cloneFrom->methods != 
nullptr);
 
 2366        memcpy(
method->d()->methods, cloneFrom->methods,
 
 2371    return method.asReturnedValue();
 
 2376    Heap::FunctionObject::init(scope);
 
 2377    wrapper.set(internalClass->engine, 
object);
 
 2378    index = methodIndex;
 
 2381const QMetaObject *Heap::QObjectMethod::metaObject()
 const 
 2383    Scope scope(internalClass->engine);
 
 2385    if (Scoped<QV4::QObjectWrapper> objectWrapper(scope, 
wrapper); objectWrapper)
 
 2386        return objectWrapper->metaObject();
 
 2387    if (Scoped<QV4::QQmlTypeWrapper> typeWrapper(scope, 
wrapper); typeWrapper)
 
 2388        return typeWrapper->metaObject();
 
 2389    if (Scoped<QV4::QQmlValueTypeWrapper> valueWrapper(scope, 
wrapper); valueWrapper)
 
 2390        return valueWrapper->metaObject();
 
 2395QObject *Heap::QObjectMethod::object()
 const 
 2397    Scope scope(internalClass->engine);
 
 2399    if (Scoped<QV4::QObjectWrapper> objectWrapper(scope, 
wrapper); objectWrapper)
 
 2400        return objectWrapper->object();
 
 2401    if (Scoped<QV4::QQmlTypeWrapper> typeWrapper(scope, 
wrapper); typeWrapper)
 
 2402        return typeWrapper->object();
 
 2406bool Heap::QObjectMethod::isDetached()
 const 
 2412    if (Scoped<QV4::QQmlValueTypeWrapper> valueWrapper(scope, 
wrapper); valueWrapper)
 
 2413        return valueWrapper->d()->object() == 
nullptr;
 
 2418bool Heap::QObjectMethod::isAttachedTo(
QObject *
o)
 const 
 2421    if (Scoped<QV4::QObjectWrapper> objectWrapper(scope, 
wrapper); objectWrapper)
 
 2422        return objectWrapper->object() == 
o;
 
 2423    if (Scoped<QV4::QQmlTypeWrapper> typeWrapper(scope, 
wrapper); typeWrapper)
 
 2424        return typeWrapper->object() == 
o;
 
 2426    if (Scoped<QV4::QQmlValueTypeWrapper> valueWrapper(scope, 
wrapper); valueWrapper) {
 
 2429            return qobject->object() == 
o;
 
 2431            return type->object() == 
o;
 
 2440Heap::QObjectMethod::ThisObjectMode Heap::QObjectMethod::checkThisObject(
 
 2451    const auto check = [&](
const QMetaObject *included) {
 
 2452        const auto stackFrame = internalClass->engine->currentStackFrame;
 
 2453        if (stackFrame && !stackFrame->v4Function->executableCompilationUnit()
 
 2454                ->nativeMethodsAcceptThisObjects()) {
 
 2456                      "%s:%d: Calling C++ methods with 'this' objects different from the one " 
 2457                      "they were retrieved from is broken, due to historical reasons. The " 
 2458                      "original object is used as 'this' object. You can allow the given " 
 2459                      "'this' object to be used by setting " 
 2460                      "'pragma NativeMethodBehavior: AcceptThisObject'",
 
 2461                      qPrintable(stackFrame->source()), stackFrame->lineNumber());
 
 2467            return thisMeta->
inherits(&QObject::staticMetaObject) ? Explicit : 
Invalid;
 
 2470        int methodOffset = included->methodOffset();
 
 2472            if (included == thisMeta)
 
 2475            if (methodOffset <= 
index)
 
 2478            included = included->superClass();
 
 2483        Q_UNREACHABLE_RETURN(
Invalid);
 
 2494QString Heap::QObjectMethod::name()
 const 
 2505    int methodOffset = 
mo->methodOffset();
 
 2506    while (methodOffset > 
index) {
 
 2507        mo = 
mo->superClass();
 
 2515void Heap::QObjectMethod::ensureMethodsCache(
const QMetaObject *thisMeta)
 
 2529    int methodOffset = 
mo->methodOffset();
 
 2530    while (methodOffset > 
index) {
 
 2531        mo = 
mo->superClass();
 
 2538    resolvedMethods.
append(dummy);
 
 2541    for (
int ii = 
index - 1; ii >= methodOffset; --ii) {
 
 2545            resolvedMethods.
append(dummy);
 
 2548    if (resolvedMethods.
size() > 1) {
 
 2551        methodCount = resolvedMethods.
size();
 
 2563    return engine->newString(
 
 2564                QObjectWrapper::objectToString(
 
 2565                    engine, 
o ? 
o->metaObject() : 
d()->metaObject(), 
o))->asReturnedValue();
 
 2572        return Encode::undefined();
 
 2579        delay = 
args[0].toUInt32();
 
 2586    return Encode::undefined();
 
 2602    Heap::QQmlValueTypeWrapper *valueWrapper = 
nullptr;
 
 2604        thisMeta = 
w->metaObject();
 
 2607        thisMeta = 
w->metaObject();
 
 2610        thisMeta = 
w->metaObject();
 
 2611        valueWrapper = 
w->
d();
 
 2614    Heap::QObjectMethod::ThisObjectMode 
mode = Heap::QObjectMethod::Invalid;
 
 2615    if (
o && 
o == 
d()->
object()) {
 
 2616        mode = Heap::QObjectMethod::Explicit;
 
 2618    } 
else if (valueWrapper && valueWrapper == 
d()->
wrapper) {
 
 2619        mode = Heap::QObjectMethod::Explicit;
 
 2622        mode = 
d()->checkThisObject(thisMeta);
 
 2623        if (
mode == Heap::QObjectMethod::Invalid) {
 
 2626            return Encode::undefined();
 
 2631        if (
mode == Heap::QObjectMethod::Included) {
 
 2638                valueWrapper = 
value->d();
 
 2647            if (!valueWrapper->enforcesLocation())
 
 2653    if (
object.isNull())
 
 2654        return Encode::undefined();
 
 2656    if (
d()->index == DestroyMethod)
 
 2657        return method_destroy(v4, 
object.qObject(), argv, argc);
 
 2658    else if (
d()->index == ToStringMethod)
 
 2659        return method_toString(v4, 
object.qObject());
 
 2661    d()->ensureMethodsCache(thisMeta);
 
 2671    const auto doCall = [&](
const auto &call) {
 
 2672        if (!
method->isConstant()) {
 
 2673            if (valueWrapper && valueWrapper->isReference()) {
 
 2675                valueWrapper->writeBack();
 
 2683    if (
d()->methodCount != 1) {
 
 2687            return Encode::undefined();
 
 2690    if (
method->isV4Function()) {
 
 2691        return doCall([&]() {
 
 2696            void *
args[] = { 
nullptr, &funcptr };
 
 2711    FunctionObject::init();
 
 2714    constructorCount = 0;
 
 2717void Heap::QMetaObjectWrapper::destroy()
 
 2722void Heap::QMetaObjectWrapper::ensureConstructorsCache() {
 
 2725    if (constructorCount != 
count) {
 
 2727        constructorCount = 
count;
 
 2749     return mo->asReturnedValue();
 
 2755    for (
int i = 0; 
i < 
mo.enumeratorCount(); 
i++) {
 
 2757        for (
int k = 0; k < Enum.
keyCount(); k++) {
 
 2758            const char* 
key = Enum.
key(k);
 
 2768    return This->constructInternal(argv, argc);
 
 2771ReturnedValue QMetaObjectWrapper::constructInternal(
const Value *argv, 
int argc)
 const 
 2774    d()->ensureConstructorsCache();
 
 2778    if (
d()->constructorCount == 0) {
 
 2784    Scoped<QObjectWrapper> 
object(scope);
 
 2785    JSCallData cData(
nullptr, argv, argc);
 
 2786    CallData *callData = cData.callData(scope);
 
 2790    if (
d()->constructorCount == 1) {
 
 2793                    objectOrGadget, 
d()->
constructors, 
d()->constructorCount, v4, callData)) {
 
 2797        Scoped<QMetaObjectWrapper> 
metaObject(scope, 
this);
 
 2799        object->setPrototypeOf(
const_cast<QMetaObjectWrapper*
>(
this));
 
 2801    return object.asReturnedValue();
 
 2827    if (
engine->signalHandlerPrototype()->d_unchecked())
 
 2837    engine->jsObjects[ExecutionEngine::SignalHandlerProto] = 
o->d();
 
 2850void MultiplyWrappedQObjectMap::removeDestroyedObject(
QObject *
object)
 
 2860#include "moc_qv4qobjectwrapper_p.cpp" 
static JNINativeMethod methods[]
 
bool remove(const Key &key)
Removes the item that has the key from the hash.
 
iterator erase(const_iterator it)
 
void throwError(const QString &message)
Throws a run-time error (exception) with the given message.
 
QJSValue newObject()
Creates a JavaScript object of class Object.
 
T fromVariant(const QVariant &value)
Returns the given value converted to the template type {T}.
 
static QJSValue fromReturnedValue(QV4::ReturnedValue d)
 
static QV4::ReturnedValue asReturnedValue(const QJSValue *jsval)
 
static QV4::ReturnedValue convertToReturnedValue(QV4::ExecutionEngine *e, const QJSValue &jsval)
 
static void setValue(QJSValue *jsval, const QV4::Value &v)
 
static void manageStringOnV4Heap(QV4::ExecutionEngine *e, QJSValue *jsval)
 
The QJSValue class acts as a container for Qt/JavaScript data types.
 
\inmodule QtCore\reentrant
 
\inmodule QtCore\reentrant
 
\inmodule QtCore\reentrant
 
qsizetype size() const noexcept
 
const_reference at(qsizetype i) const noexcept
 
void append(parameter_type t)
 
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.
 
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
 
@ PropertyToPropertyBinding
 
void setTarget(const QQmlProperty &)
 
void setBoundFunction(QV4::BoundFunction *boundFunction)
 
void setSourceLocation(const QQmlSourceLocation &location)
 
static QQmlBinding * create(const QQmlPropertyData *, const QQmlScriptString &, QObject *, QQmlContext *)
 
static void flushPendingBinding(QObject *object, int coreIndex)
 
static QQmlPropertyCache::ConstPtr ensurePropertyCache(QObject *object)
 
QQmlPropertyCache::ConstPtr propertyCache
 
quint32 hasTaintedV4Object
 
static bool keepAliveDuringGarbageCollection(const QObject *object)
 
QQmlRefPointer< QQmlContextData > ownContext
 
void disconnectNotifiers()
 
QQmlContextData * context
 
static bool wasDeleted(const QObject *)
 
static QQmlData * get(QObjectPrivate *priv, bool create)
 
void setImplicitDestructible()
 
quint32 isQueuedForDeletion
 
QQmlPropertyCapture * propertyCapture
 
void warning(const QQmlError &)
 
static QQmlEnginePrivate * get(QQmlEngine *e)
 
The QQmlEngine class provides an environment for instantiating QML components.
 
The QQmlError class encapsulates a QML error.
 
virtual bool mustCaptureBindableProperty() const
 
static QUntypedPropertyBinding createFromBoundFunction(const QQmlPropertyData *pd, QV4::BoundFunction *function, QObject *obj, const QQmlRefPointer< QQmlContextData > &ctxt, QV4::ExecutionContext *scope, QObject *target, QQmlPropertyIndex targetIndex)
 
static QUntypedPropertyBinding create(const QQmlPropertyData *pd, QV4::Function *function, QObject *obj, const QQmlRefPointer< QQmlContextData > &ctxt, QV4::ExecutionContext *scope, QObject *target, QQmlPropertyIndex targetIndex)
 
const QQmlPropertyData * property(const K &key, QObject *object, const QQmlRefPointer< QQmlContextData > &context) const
 
QQmlJavaScriptExpression * expression
 
void captureProperty(QQmlNotifier *)
 
bool isConstructor() const
 
bool isVarProperty() const
 
bool hasArguments() const
 
QMetaType propType() const
 
bool isV4Function() const
 
void load(const QMetaProperty &)
 
static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags=None, QQmlPropertyData::WriteFlags writeFlags=QQmlPropertyData::DontRemoveBinding)
 
static void findAliasTarget(QObject *, QQmlPropertyIndex, QObject **, QQmlPropertyIndex *)
 
static void removeBinding(const QQmlProperty &that)
 
static bool write(QObject *, const QQmlPropertyData &, const QVariant &, const QQmlRefPointer< QQmlContextData > &, QQmlPropertyData::WriteFlags flags={})
 
static void flushSignal(const QObject *sender, int signal_index)
 
static QQmlAbstractBinding * binding(QObject *, QQmlPropertyIndex index)
 
The QQmlScriptString class encapsulates a script and its context.
 
bool isSequentialContainer() const
 
QMetaSequence listMetaSequence() const
 
\macro QT_RESTRICTED_CAST_FROM_ASCII
 
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
 
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
 
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
 
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
 
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
 
bool singleShot
whether the timer is a single-shot timer
 
bool setBinding(const QUntypedPropertyBinding &binding)
Sets the underlying property's binding to binding.
 
ObjectType::Data * allocate(Args &&... args)
 
ExecutionEngine * engine() const
 
ReturnedValue value() const
 
void set(ExecutionEngine *engine, const Value &value)
 
void markOnce(MarkStack *markStack)
 
void set(ExecutionEngine *engine, const Value &value)
 
constexpr size_type size() const noexcept
 
const T & at(qsizetype idx) const
 
object setProperty("down", true)
 
QCache< int, Employee > cache
[0]
 
QSet< QString >::iterator it
 
Combined button and popup list for selecting options.
 
\qmltype Particle \inqmlmodule QtQuick.Particles
 
static int MatchScore(const Value &actual, QMetaType conversionMetaType)
 
static ReturnedValue CallPrecise(const QQmlObjectOrGadget &object, const QQmlPropertyData &data, ExecutionEngine *engine, CallData *callArgs, QMetaObject::Call callType=QMetaObject::InvokeMetaMethod)
 
static const QQmlPropertyData * ResolveOverloaded(const QQmlObjectOrGadget &object, const QQmlPropertyData *methods, int methodCount, ExecutionEngine *engine, CallData *callArgs)
 
static QPair< QObject *, int > extractQtSignal(const Value &value)
 
static ReturnedValue CallMethod(const QQmlObjectOrGadget &object, int index, QMetaType returnType, int argCount, const QMetaType *argTypes, ExecutionEngine *engine, CallData *callArgs, QMetaObject::Call callType=QMetaObject::InvokeMetaMethod)
 
static ReturnedValue loadProperty(ExecutionEngine *v4, Heap::Object *wrapper, QObject *object, const QQmlPropertyData &property)
 
static void markChildQObjectsRecursively(QObject *parent, MarkStack *markStack)
 
void setupQObjectLookup(Lookup *lookup, const QQmlData *ddata, const QQmlPropertyData *propertyData)
 
Scoped< Object > ScopedObject
 
void setupQObjectMethodLookup(Lookup *lookup, const QQmlData *ddata, const QQmlPropertyData *propertyData, const Object *self, Heap::QObjectMethod *method)
 
Scoped< ArrayObject > ScopedArrayObject
 
int MatchVariant(QMetaType conversionMetaType, Retrieve &&retrieve)
 
static OptionalReturnedValue getDestroyOrToStringMethod(ExecutionEngine *v4, String *name, Heap::Object *qobj, bool *hasProperty=nullptr)
 
static Heap::ReferenceObject::Flags referenceFlags(ExecutionEngine *v4, const QQmlPropertyData &property)
 
static OptionalReturnedValue getPropertyFromImports(ExecutionEngine *v4, String *name, const QQmlRefPointer< QQmlContextData > &qmlContext, QObject *qobj, bool *hasProperty=nullptr)
 
static int numDefinedArguments(CallData *callArgs)
 
QString boolValue(bool v)
 
#define QT_WARNING_DISABLE_GCC(text)
 
std::pair< T1, T2 > QPair
 
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
 
DBusConnection const char DBusError * error
 
DBusConnection * connection
 
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
 
static QString methodName(const QDBusIntrospection::Method &method)
 
static struct AttrInfo attrs[]
 
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
 
#define Q_LOGGING_CATEGORY(name,...)
 
#define qCInfo(category,...)
 
#define qCWarning(category,...)
 
#define qCDebug(category,...)
 
static ControlElement< T > * ptr(QWidget *widget)
 
constexpr const T & qMax(const T &a, const T &b)
 
GLboolean GLboolean GLboolean b
 
GLsizei const GLfloat * v
[13]
 
GLfloat GLfloat GLfloat w
[0]
 
GLboolean GLboolean GLboolean GLboolean a
[7]
 
GLenum GLuint GLenum GLsizei length
 
GLenum GLenum GLsizei count
 
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
 
GLfloat GLfloat GLfloat GLfloat h
 
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
 
QQmlEngine * qmlEngine(const QObject *obj)
 
QQmlContext * qmlContext(const QObject *obj)
 
bool qmlobject_can_cpp_cast(QObject *object, const QMetaObject *mo)
 
static QCborArray constructors(const QCborMap *classDef, QLatin1StringView key, QTypeRevision maxMajorVersion)
 
static QT_BEGIN_NAMESPACE QAsn1Element wrap(quint8 type, const QAsn1Element &child)
 
#define qPrintable(string)
 
QLatin1StringView QLatin1String
 
#define QStringLiteral(str)
 
#define PROPERTY_STORE(cpptype, value)
 
#define RETURN_UNDEFINED()
 
#define THROW_GENERIC_ERROR(str)
 
#define DEFINE_OBJECT_VTABLE(classname)
 
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
 
obj metaObject() -> className()
 
myObject disconnect()
[26]
 
\inmodule QtCore \reentrant
 
MemoryManager * memoryManager
 
CppStackFrame * currentStackFrame
 
ExecutionContext * rootContext() const
 
QQmlRefPointer< QQmlContextData > callingQmlContext() const
 
Heap::String * newString(const QString &s=QString())
 
QQmlError catchExceptionAsQmlError()
 
String * id_constructor() const
 
ReturnedValue throwError(const Value &value)
 
QV4::ReturnedValue fromVariant(const QVariant &)
 
String * id_destroy() const
 
String * id_toString() const
 
QQmlEngine * qmlEngine() const
 
ReturnedValue throwTypeError()
 
ReturnedValue asReturnedValue() const
 
CallData * callData(const Scope &scope, const FunctionObject *f=nullptr) const
 
ReturnedValue(* getter)(Lookup *l, ExecutionEngine *engine, const Value &object)
 
Heap::InternalClass * internalClass() const
 
ExecutionEngine * engine() const
 
ExecutionEngine * engine() const
 
ReturnedValue callInternal(const Value *thisObject, const Value *argv, int argc) const
 
PersistentValue thisObject
 
static void impl(int which, QSlotObjectBase *this_, QObject *receiver, void **metaArgs, bool *ret)
 
~QObjectWrapperOwnPropertyKeyIterator() override=default
 
static const QQmlPropertyData * findProperty(QObject *o, const QQmlRefPointer< QQmlContextData > &qmlContext, String *name, Flags flags, QQmlPropertyData *local)
 
ReturnedValue getQmlProperty(const QQmlRefPointer< QQmlContextData > &qmlContext, String *name, Flags flags, bool *hasProperty=nullptr) const
 
static ReturnedValue getProperty(ExecutionEngine *engine, Heap::Object *wrapper, QObject *object, const QQmlPropertyData *property, Flags flags)
 
static bool readReference(HeapObject *ref)
 
bool hasException() const
 
static ReturnedValue newSequence(QV4::ExecutionEngine *engine, QMetaType type, QMetaSequence metaSequence, const void *data, Heap::Object *object, int propertyIndex, Heap::ReferenceObject::Flags flags)
 
static void * getRawContainerPtr(const Sequence *object, QMetaType typeHint)
 
const Value & asValue() const
 
constexpr ReturnedValue asReturnedValue() const
 
QString toQStringNoThrow() const
 
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
 
virtual HRESULT STDMETHODCALLTYPE Compare(__RPC__in_opt ITextRangeProvider *range, __RPC__out BOOL *pRetVal)=0