aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2013-09-17 13:31:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 01:08:55 +0200
commit8850e2eafaba8a6493d3ad5ab584b751eb9a8742 (patch)
tree44cd04859a1d2190c27b552bf9b8add6209ae996 /src/qml/qml/qqmlengine.cpp
parent67ee1cd27b5e951e782e49edf382e8e7d8ee431f (diff)
Register Locale object in the QtQml namespace.
It was previously registered with QtQuick, which meant QtQuick had to be imported in order to use Locale; a basic QML object. Task-number: QTBUG-32505 Change-Id: I9d49cc0d87c0fae07b46885fcdec4f27fb0e0708 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 33c9d87856..f3a1867d18 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -773,6 +773,7 @@ void QQmlEnginePrivate::init()
if (baseModulesUninitialized) {
qmlRegisterType<QQmlComponent>("QML", 1, 0, "Component"); // required for the Compiler.
registerBaseTypes("QtQml", 2, 0); // import which provides language building blocks.
+ qmlRegisterUncreatableType<QQmlLocale>("QtQml", 2, 2, "Locale", QQmlEngine::tr("Locale cannot be instantiated. Use Qt.locale()"));
QQmlData::init();
baseModulesUninitialized = false;