From a2420e0650b23aad5daf4f146722d54aa649c77f Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 2 Dec 2009 09:40:06 +1000 Subject: Get qsTr and friends working again. --- src/declarative/qml/qmlengine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); qRegisterMetaType("QmlScriptString"); - scriptEngine.installTranslatorFunctions(); contextClass = new QmlContextScriptClass(q); objectClass = new QmlObjectScriptClass(q); valueTypeClass = new QmlValueTypeScriptClass(q); -- cgit v0.12