diff options
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index 7225612f08..1af8fc887f 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -33,6 +33,7 @@ class QObject; class QQmlData; class QQmlPropertyCache; class QQmlPropertyData; +class QQmlObjectOrGadget; namespace QV4 { struct QObjectSlotDispatcher; @@ -97,16 +98,6 @@ DECLARE_EXPORTED_HEAP_OBJECT(QObjectMethod, FunctionObject) { QV4::Heap::QObjectMethod::ThisObjectMode checkThisObject(const QMetaObject *thisMeta) const; }; -struct QMetaObjectWrapper : FunctionObject { - const QMetaObject* metaObject; - QQmlPropertyData *constructors; - int constructorCount; - - void init(const QMetaObject* metaObject); - void destroy(); - void ensureConstructorsCache(); -}; - struct QmlSignalHandler : Object { void init(QObject *object, int signalIndex); void destroy() { @@ -385,24 +376,22 @@ struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject QObject *thisObject, void **argv, const QMetaType *types, int argc) const; static QPair<QObject *, int> extractQtMethod(const QV4::FunctionObject *function); -}; - -struct Q_QML_EXPORT QMetaObjectWrapper : public QV4::FunctionObject -{ - V4_OBJECT2(QMetaObjectWrapper, QV4::FunctionObject) - V4_NEEDS_DESTROY +private: + friend struct QMetaObjectWrapper; - static ReturnedValue create(ExecutionEngine *engine, const QMetaObject* metaObject); - const QMetaObject *metaObject() const { return d()->metaObject; } + static const QQmlPropertyData *resolveOverloaded( + const QQmlObjectOrGadget &object, const QQmlPropertyData *methods, int methodCount, + ExecutionEngine *engine, CallData *callArgs); -protected: - static ReturnedValue virtualCallAsConstructor(const FunctionObject *, const Value *argv, int argc, const Value *); - static bool virtualIsEqualTo(Managed *a, Managed *b); + static const QQmlPropertyData *resolveOverloaded( + const QQmlPropertyData *methods, int methodCount, + void **argv, int argc, const QMetaType *types); -private: - void init(ExecutionEngine *engine); - ReturnedValue constructInternal(const Value *argv, int argc) const; + static ReturnedValue callPrecise( + const QQmlObjectOrGadget &object, const QQmlPropertyData &data, + ExecutionEngine *engine, CallData *callArgs, + QMetaObject::Call callType = QMetaObject::InvokeMetaMethod); }; struct Q_QML_EXPORT QmlSignalHandler : public QV4::Object |