diff options
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 5 |
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); |