summaryrefslogtreecommitdiffstats
path: root/src/script/api
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
committeraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
commite48850c6ec90cd5eaa95d07573c2afa1a1c4f67f (patch)
treec53fa338b532c986b4baa1b481e5406f2fa16b5a /src/script/api
parent390d7f64d9afa288fb2c01fc70eddc8b1f5ff585 (diff)
parent7491a2ecfdd0fe883c72d2ee60ca72393c2990d9 (diff)
downloadQt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.zip
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.gz
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.bz2
Merge branch '4.6-s60' into 4.7-s60
Conflicts: configure.exe mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/gui/kernel/qapplication.cpp src/gui/text/qtextlayout.cpp src/openvg/qpixmapdata_vg.cpp src/s60installs/s60installs.pro tools/runonphone/main.cpp tools/runonphone/serenum_unix.cpp qtextlayout.cpp fixed up together with Eskil. Kept the configure.exe from 4.7 without recompile.
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/qscriptengine.cpp2
-rw-r--r--src/script/api/qscriptvalue.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 294c3a0..356b4d0 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -3318,7 +3318,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));
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index a3af2d4..5db1165 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1609,7 +1609,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
JSC::MarkedArgumentBuffer applyArgs;
if (!array.isUndefinedOrNull()) {
if (!array.isObject()) {
- return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError));
+ return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
}
if (JSC::asObject(array)->classInfo() == &JSC::Arguments::info)
JSC::asArguments(array)->fillArgList(exec, applyArgs);
@@ -1620,8 +1620,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
for (unsigned i = 0; i < length; ++i)
applyArgs.append(JSC::asArray(array)->get(exec, i));
} else {
- Q_ASSERT_X(false, Q_FUNC_INFO, "implement me");
-// return JSC::throwError(exec, JSC::TypeError);
+ return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
}
}