diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-28 13:33:10 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-22 08:20:13 +0000 |
commit | 13edffa303c0a4514035857b4a61b2665ede7b2c (patch) | |
tree | b284190179941285ca2397ab61c593a6e864ba91 /src/qml/qml/qqmltypewrapper.cpp | |
parent | 2a8de9d8d85c5ce3e9c61fd8c0e957521f6a0846 (diff) |
Move remaining objects to new constructor syntax
Also disable the old way of constructing objects.
Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmltypewrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmltypewrapper.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 1145f1b64f..d70a4019b2 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -48,12 +48,8 @@ using namespace QV4; DEFINE_OBJECT_VTABLE(QmlTypeWrapper); -Heap::QmlTypeWrapper::QmlTypeWrapper(ExecutionEngine *engine) - : Heap::Object(engine) - , mode(IncludeEnums) - , type(Q_NULLPTR) - , typeNamespace(Q_NULLPTR) - , importNamespace(Q_NULLPTR) +Heap::QmlTypeWrapper::QmlTypeWrapper() + : mode(IncludeEnums) { } @@ -103,7 +99,7 @@ ReturnedValue QmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, Q Q_ASSERT(t); Scope scope(engine); - Scoped<QmlTypeWrapper> w(scope, engine->memoryManager->alloc<QmlTypeWrapper>(engine)); + Scoped<QmlTypeWrapper> w(scope, engine->memoryManager->allocObject<QmlTypeWrapper>()); w->d()->mode = mode; w->d()->object = o; w->d()->type = t; return w.asReturnedValue(); } @@ -117,7 +113,7 @@ ReturnedValue QmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, Q Q_ASSERT(importNamespace); Scope scope(engine); - Scoped<QmlTypeWrapper> w(scope, engine->memoryManager->alloc<QmlTypeWrapper>(engine)); + Scoped<QmlTypeWrapper> w(scope, engine->memoryManager->allocObject<QmlTypeWrapper>()); w->d()->mode = mode; w->d()->object = o; w->d()->typeNamespace = t; w->d()->importNamespace = importNamespace; t->addref(); return w.asReturnedValue(); |