aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-13 21:38:25 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-21 19:32:23 +0100
commit2784a68d64519ccc5d01b6c1378207572cf1ebcd (patch)
treeb66287687e7311a24253d60e18bcba829fb475ad /src/qml/qml/qqmlcomponent.cpp
parent2cb6d1bf32e017026f618dcfdbef3980f5363656 (diff)
Cleanup destruction of heap objects
Generate the code from a macro instead of duplicating boiler plate code. Operate on Heap::Base instead of Managed. Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 33cffe6629..5b6db65a6c 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1089,6 +1089,7 @@ struct QmlIncubatorObject : Object {
struct QmlIncubatorObject : public QV4::Object
{
V4_OBJECT2(QmlIncubatorObject, Object)
+ V4_NEEDS_DESTROY
static QV4::ReturnedValue method_get_statusChanged(QV4::CallContext *ctx);
static QV4::ReturnedValue method_set_statusChanged(QV4::CallContext *ctx);
@@ -1096,7 +1097,6 @@ struct QmlIncubatorObject : public QV4::Object
static QV4::ReturnedValue method_get_object(QV4::CallContext *ctx);
static QV4::ReturnedValue method_forceCompletion(QV4::CallContext *ctx);
- static void destroy(Managed *that);
static void markObjects(QV4::Heap::Base *that, QV4::ExecutionEngine *e);
void statusChanged(QQmlIncubator::Status);
@@ -1507,11 +1507,6 @@ void QV4::QmlIncubatorObject::setInitialState(QObject *o)
}
}
-void QV4::QmlIncubatorObject::destroy(Managed *that)
-{
- static_cast<QmlIncubatorObject *>(that)->d()->~Data();
-}
-
void QV4::QmlIncubatorObject::markObjects(QV4::Heap::Base *that, QV4::ExecutionEngine *e)
{
QmlIncubatorObject::Data *o = static_cast<QmlIncubatorObject::Data *>(that);