summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlengine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 864d07e..92a6bd9 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -160,6 +160,10 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
scriptEngine.globalObject().setProperty(QLatin1String("createComponent"),
scriptEngine.newFunction(QmlEnginePrivate::createComponent, 1));
+ // translation functions need to be installed
+ // before the global script class is constructed (QTBUG-6437)
+ scriptEngine.installTranslatorFunctions();
+
globalClass = new QmlGlobalScriptClass(&scriptEngine);
}
@@ -227,7 +231,6 @@ void QmlEnginePrivate::init()
qRegisterMetaType<QVariant>("QVariant");
qRegisterMetaType<QmlScriptString>("QmlScriptString");
- scriptEngine.installTranslatorFunctions();
contextClass = new QmlContextScriptClass(q);
objectClass = new QmlObjectScriptClass(q);
valueTypeClass = new QmlValueTypeScriptClass(q);