aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmllocale_p.h')
-rw-r--r--src/qml/qml/qqmllocale_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h
index 652a3ca0d4..275f58db7d 100644
--- a/src/qml/qml/qqmllocale_p.h
+++ b/src/qml/qml/qqmllocale_p.h
@@ -143,8 +143,12 @@ namespace QV4 {
namespace Heap {
struct QQmlLocaleData : Object {
- inline QQmlLocaleData() {}
- QLocale locale;
+ inline void init() { locale = new QLocale; }
+ void destroy() {
+ delete locale;
+ Object::destroy();
+ }
+ QLocale *locale;
};
}
@@ -161,7 +165,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);