aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-09-09 10:06:31 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-10-05 13:15:18 +0000
commit64afa01c32fc1824b280452ceb1ade4f655487f2 (patch)
treef5775f2ddfd5145ae26df41a356dfa14172200b7 /src/qml/qml/qqmllocale_p.h
parenta166367bd877a55e552e3dfe5cf2ee7fa1561100 (diff)
QML: Introduce destroy() on Base subclasses
This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllocale_p.h')
-rw-r--r--src/qml/qml/qqmllocale_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h
index 652a3ca0d4..4494fa9b53 100644
--- a/src/qml/qml/qqmllocale_p.h
+++ b/src/qml/qml/qqmllocale_p.h
@@ -143,8 +143,9 @@ namespace QV4 {
namespace Heap {
struct QQmlLocaleData : Object {
- inline QQmlLocaleData() {}
- QLocale locale;
+ inline QQmlLocaleData() { locale = new QLocale; }
+ void destroy() { delete locale; }
+ QLocale *locale;
};
}
@@ -161,7 +162,7 @@ struct QQmlLocaleData : public QV4::Object
ctx->engine()->throwTypeError();
return 0;
}
- return &thisObject->d()->locale;
+ return thisObject->d()->locale;
}
static QV4::ReturnedValue method_currencySymbol(QV4::CallContext *ctx);