diff options
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qmlcontext_p.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext_p.h b/src/qml/jsruntime/qv4qmlcontext_p.h index 9aec7467da..2f1dbabaf2 100644 --- a/src/qml/jsruntime/qv4qmlcontext_p.h +++ b/src/qml/jsruntime/qv4qmlcontext_p.h @@ -62,11 +62,11 @@ QT_BEGIN_NAMESPACE namespace QV4 { -struct QmlContextWrapper; +struct QQmlContextWrapper; namespace Heap { -struct QmlContextWrapper : Object { +struct QQmlContextWrapper : Object { void init(QQmlContextData *context, QObject *scopeObject, bool ownsContext = false); void destroy(); bool readOnly; @@ -77,17 +77,20 @@ struct QmlContextWrapper : Object { QQmlQPointer<QObject> scopeObject; }; -struct QmlContext : ExecutionContext { - void init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml); +#define QmlContextMembers(class, Member) \ + Member(class, Pointer, QQmlContextWrapper *, qml) - Pointer<QmlContextWrapper> qml; +DECLARE_HEAP_OBJECT(QmlContext, ExecutionContext) { + DECLARE_MARK_TABLE(QmlContext); + + void init(QV4::ExecutionContext *outerContext, QV4::QQmlContextWrapper *qml); }; } -struct Q_QML_EXPORT QmlContextWrapper : Object +struct Q_QML_EXPORT QQmlContextWrapper : Object { - V4_OBJECT2(QmlContextWrapper, Object) + V4_OBJECT2(QQmlContextWrapper, Object) V4_NEEDS_DESTROY void takeContextOwnership() { @@ -100,7 +103,7 @@ struct Q_QML_EXPORT QmlContextWrapper : Object void setReadOnly(bool b) { d()->readOnly = b; } static ReturnedValue get(const Managed *m, String *name, bool *hasProperty); - static void put(Managed *m, String *name, const Value &value); + static bool put(Managed *m, String *name, const Value &value); }; struct Q_QML_EXPORT QmlContext : public ExecutionContext |