summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-01 23:40:06 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-01 23:40:52 (GMT)
commita2420e0650b23aad5daf4f146722d54aa649c77f (patch)
tree903ac42424158b8663463a7ed53e1af195a46ae3 /src
parent17772ed96a126b48fda3dbaa945f705059681e06 (diff)
downloadQt-a2420e0650b23aad5daf4f146722d54aa649c77f.zip
Qt-a2420e0650b23aad5daf4f146722d54aa649c77f.tar.gz
Qt-a2420e0650b23aad5daf4f146722d54aa649c77f.tar.bz2
Get qsTr and friends working again.
Diffstat (limited to 'src')
-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);