diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 8 | ||||
| -rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 28 |
2 files changed, 19 insertions, 17 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 59bdf33c55..33e30fbabd 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1754,13 +1754,13 @@ ReturnedValue QObjectMethod::create(ExecutionContext *scope, QObject *object, in return (scope->d()->engine->memoryManager->alloc<QObjectMethod>(scope, object, index, qmlGlobal))->asReturnedValue(); } -QObjectMethod::Data::Data(ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal) +Heap::QObjectMethod::QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal) : Heap::FunctionObject(scope) , object(object) , index(index) , qmlGlobal(qmlGlobal) { - setVTable(staticVTable()); + setVTable(QV4::QObjectMethod::staticVTable()); subtype = WrappedQtMethod; } @@ -1889,12 +1889,12 @@ ReturnedValue QObjectMethod::callInternal(CallData *callData) DEFINE_OBJECT_VTABLE(QObjectMethod); -QmlSignalHandler::Data::Data(ExecutionEngine *engine, QObject *object, int signalIndex) +Heap::QmlSignalHandler::QmlSignalHandler(QV4::ExecutionEngine *engine, QObject *object, int signalIndex) : Heap::Object(engine) , object(object) , signalIndex(signalIndex) { - setVTable(staticVTable()); + setVTable(QV4::QmlSignalHandler::staticVTable()); } DEFINE_OBJECT_VTABLE(QmlSignalHandler); diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index 746c158214..8f04c341c2 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -74,6 +74,19 @@ struct QObjectWrapper : Object { QPointer<QObject> object; }; +struct QObjectMethod : FunctionObject { + QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal); + QPointer<QObject> object; + int index; + QV4::PersistentValue qmlGlobal; +}; + +struct QmlSignalHandler : Object { + QmlSignalHandler(QV4::ExecutionEngine *engine, QObject *object, int signalIndex); + QPointer<QObject> object; + int signalIndex; +}; + } struct Q_QML_EXPORT QObjectWrapper : public Object @@ -122,13 +135,7 @@ private: struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject { - struct Data : QV4::Heap::FunctionObject { - Data(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal); - QPointer<QObject> object; - int index; - QV4::PersistentValue qmlGlobal; - }; - V4_OBJECT(QV4::FunctionObject) + V4_OBJECT2(QObjectMethod, QV4::FunctionObject) enum { DestroyMethod = -1, ToStringMethod = -2 }; @@ -152,12 +159,7 @@ struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject struct QmlSignalHandler : public QV4::Object { - struct Data : QV4::Heap::Object { - Data(ExecutionEngine *engine, QObject *object, int signalIndex); - QPointer<QObject> object; - int signalIndex; - }; - V4_OBJECT(QV4::Object) + V4_OBJECT2(QmlSignalHandler, QV4::Object) int signalIndex() const { return d()->signalIndex; } |
