From 2784a68d64519ccc5d01b6c1378207572cf1ebcd Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 13 Nov 2014 21:38:25 +0100 Subject: 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 --- src/qml/qml/qqmllocale_p.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/qml/qml/qqmllocale_p.h') diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h index 34224b44ff..744d82a6d2 100644 --- a/src/qml/qml/qqmllocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -135,6 +135,7 @@ struct QQmlLocaleData : Object { struct QQmlLocaleData : public QV4::Object { V4_OBJECT2(QQmlLocaleData, Object) + V4_NEEDS_DESTROY static QLocale *getThisLocale(QV4::CallContext *ctx) { QV4::Object *o = ctx->d()->callData->thisObject.asObject(); @@ -173,12 +174,6 @@ struct QQmlLocaleData : public QV4::Object static QV4::ReturnedValue method_get_exponential(QV4::CallContext *ctx); static QV4::ReturnedValue method_get_amText(QV4::CallContext *ctx); static QV4::ReturnedValue method_get_pmText(QV4::CallContext *ctx); - -private: - static void destroy(Managed *that) - { - static_cast(that)->d()->~Data(); - } }; Heap::QQmlLocaleData::QQmlLocaleData(ExecutionEngine *engine) -- cgit v1.2.3