diff options
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index bc6fa09d4f..896de97c56 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -104,9 +104,15 @@ private: DECLARE_HEAP_OBJECT(QObjectMethod, FunctionObject) { DECLARE_MARKOBJECTS(QObjectMethod); + QQmlPropertyData *methods; + int methodCount; + alignas(alignof(QQmlPropertyData)) std::byte _singleMethod[sizeof(QQmlPropertyData)]; + void init(QV4::ExecutionContext *scope); void destroy() { + if (methods != reinterpret_cast<QQmlPropertyData *>(&_singleMethod)) + delete[] methods; setPropertyCache(nullptr); qObj.destroy(); FunctionObject::destroy(); @@ -121,6 +127,8 @@ DECLARE_HEAP_OBJECT(QObjectMethod, FunctionObject) { _propertyCache = c; } + void ensureMethodsCache(); + const QMetaObject *metaObject(); QObject *object() const { return qObj.data(); } void setObject(QObject *o) { qObj = o; } @@ -317,9 +325,6 @@ protected: private: void init(ExecutionEngine *engine); ReturnedValue constructInternal(const Value *argv, int argc) const; - ReturnedValue callConstructor(const QQmlPropertyData &data, QV4::ExecutionEngine *engine, QV4::CallData *callArgs) const; - ReturnedValue callOverloadedConstructor(QV4::ExecutionEngine *engine, QV4::CallData *callArgs) const; - }; struct Q_QML_EXPORT QmlSignalHandler : public QV4::Object |