diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-30 22:22:00 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:58:28 +0000 |
commit | 8b3cbc4403e3eac286613691c11aa1ded588da59 (patch) | |
tree | 48bc8592a69ce2585639f4e83258bb776c4f32ab /src/qml/qml | |
parent | 2fbb5c93c765ea53c3bd5f30b8bf769ccc88874a (diff) |
Refactor how we define Heap objects
Declare the type of Heap object in the Member() macro, instead of
deducing it from templates. This allows us to encode the offset
of the member in the second template argument to Pointer<> in
a second step.
Change-Id: I2cfb73785749d3fb991689b4e0554a72b3e5e13f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 10 | ||||
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 487846f610..79e52f3914 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1047,11 +1047,11 @@ namespace QV4 { namespace Heap { #define QmlIncubatorObjectMembers(class, Member) \ - Member(class, Value, valuemap) \ - Member(class, Value, statusChanged) \ - Member(class, Pointer<QmlContext>, qmlContext) \ - Member(class, QQmlComponentIncubator *, incubator) \ - Member(class, QQmlQPointer<QObject>, parent) + Member(class, Value, Value, valuemap) \ + Member(class, Value, Value, statusChanged) \ + Member(class, Pointer, QmlContext *, qmlContext) \ + Member(class, NoMark, QQmlComponentIncubator *, incubator) \ + Member(class, NoMark, QQmlQPointer<QObject>, parent) DECLARE_HEAP_OBJECT(QmlIncubatorObject, Object) { DECLARE_MARK_TABLE(QmlIncubatorObject); diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 868120a2f6..502a693d5c 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1598,7 +1598,7 @@ struct QQmlXMLHttpRequestWrapper : Object { }; #define QQmlXMLHttpRequestCtorMembers(class, Member) \ - Member(class, Pointer<Object>, proto) + Member(class, Pointer, Object *, proto) DECLARE_HEAP_OBJECT(QQmlXMLHttpRequestCtor, FunctionObject) { DECLARE_MARK_TABLE(QQmlXMLHttpRequestCtor); |