summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/script/api/qscriptengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 1199263..d6d1367 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2921,7 +2921,7 @@ void QScriptEngine::installTranslatorFunctions(const QScriptValue &object)
JSC::JSValue jscObject = d->scriptValueToJSCValue(object);
JSC::JSGlobalObject *glob = d->originalGlobalObject();
if (!jscObject || !jscObject.isObject())
- jscObject = glob;
+ jscObject = d->globalObject();
// unsigned attribs = JSC::DontEnum;
JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 5, JSC::Identifier(exec, "qsTranslate"), QScript::functionQsTranslate));
JSC::asObject(jscObject)->putDirectFunction(exec, new (exec)JSC::NativeFunctionWrapper(exec, glob->prototypeFunctionStructure(), 2, JSC::Identifier(exec, "QT_TRANSLATE_NOOP"), QScript::functionQsTranslateNoOp));