aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-12-18 19:43:56 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-02-15 08:04:43 +0000
commitf254b0aa67a4656d25c7ea240efcd00084772f00 (patch)
treedd3a4305e4ac68d174f3e7998f6339e8e9f95d03 /src/qml/qml/v8/qv8engine.cpp
parent268931e742908368a7eab7c16021601bb0a95dc5 (diff)
Add a feature for QML locale support
Change-Id: I1cfb2da317f52709011b67a68e87a73ed24ef6d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/v8/qv8engine.cpp')
-rw-r--r--src/qml/qml/v8/qv8engine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 423edc3559..da3668d910 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -51,7 +51,9 @@
#if QT_CONFIG(qml_xml_http_request)
#include <private/qqmlxmlhttprequest_p.h>
#endif
+#if QT_CONFIG(qml_locale)
#include <private/qqmllocale_p.h>
+#endif
#include <private/qqmlglobal_p.h>
#include <private/qqmlmemoryprofiler_p.h>
#include <private/qqmlplatform_p.h>
@@ -189,9 +191,11 @@ void QV8Engine::initializeGlobal()
QV4::ScopedObject qt(scope, m_v4Engine->memoryManager->allocObject<QV4::QtObject>(m_engine));
m_v4Engine->globalObject->defineDefaultProperty(QStringLiteral("Qt"), qt);
+#if QT_CONFIG(qml_locale)
QQmlLocale::registerStringLocaleCompare(m_v4Engine);
QQmlDateExtension::registerExtension(m_v4Engine);
QQmlNumberExtension::registerExtension(m_v4Engine);
+#endif
#if QT_CONFIG(qml_xml_http_request)
qt_add_domexceptions(m_v4Engine);