diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-05-09 10:14:25 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:49:17 +0200 |
commit | dc7a53d85685e7ed768cc2ec9f4e0374b6a137f5 (patch) | |
tree | 5b652f8f6c464aa827736173f31133779bbe3c0a /src/qml/jsruntime/qv4qobjectwrapper_p.h | |
parent | 45f7120d42f628e86ae2bf3bd2789fdb190490e0 (diff) |
Convert construtors for QObjectWrapper
Change-Id: Ie35966670b8fdc0d924f05d77e03ad9ae0d5b4c2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index bc89dcabf8..c342caf1be 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -78,6 +78,7 @@ struct QObjectSlotDispatcher; struct Q_QML_EXPORT QObjectWrapper : public QV4::Object { struct Data : QV4::Object::Data { + Data(ExecutionEngine *engine, QObject *object); QPointer<QObject> object; }; struct { @@ -113,8 +114,6 @@ private: static ReturnedValue create(ExecutionEngine *engine, QObject *object); - QObjectWrapper(ExecutionEngine *engine, QObject *object); - QQmlPropertyData *findProperty(ExecutionEngine *engine, QQmlContextData *qmlContext, String *name, RevisionMode revisionMode, QQmlPropertyData *local) const; static ReturnedValue get(Managed *m, String *name, bool *hasProperty); @@ -131,6 +130,7 @@ private: struct QObjectMethod : public QV4::FunctionObject { struct Data : QV4::FunctionObject::Data { + Data(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal); QPointer<QObject> object; int index; QV4::PersistentValue qmlGlobal; @@ -150,9 +150,6 @@ struct QObjectMethod : public QV4::FunctionObject int methodIndex() const { return d()->index; } QObject *object() const { return d()->object.data(); } -private: - QObjectMethod(QV4::ExecutionContext *scope, QObject *object, int index, const ValueRef qmlGlobal); - QV4::ReturnedValue method_toString(QV4::ExecutionContext *ctx); QV4::ReturnedValue method_destroy(QV4::ExecutionContext *ctx, const ValueRef args, int argc); @@ -162,13 +159,14 @@ private: static void destroy(Managed *that) { - static_cast<QObjectMethod *>(that)->~QObjectMethod(); + static_cast<QObjectMethod *>(that)->d()->~Data(); } }; struct QmlSignalHandler : public QV4::Object { struct Data : QV4::Object::Data { + Data(ExecutionEngine *engine, QObject *object, int signalIndex); QPointer<QObject> object; int signalIndex; }; @@ -179,7 +177,6 @@ struct QmlSignalHandler : public QV4::Object V4_OBJECT - QmlSignalHandler(ExecutionEngine *engine, QObject *object, int signalIndex); int signalIndex() const { return d()->signalIndex; } QObject *object() const { return d()->object.data(); } @@ -188,7 +185,7 @@ private: static void destroy(Managed *that) { - static_cast<QmlSignalHandler *>(that)->~QmlSignalHandler(); + static_cast<QmlSignalHandler *>(that)->d()->~Data(); } }; |