summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-04-14 09:47:24 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-04-14 09:49:06 (GMT)
commit00f01532342713e4adae0ce8ccd332829acfeec0 (patch)
tree91eddc0e5597254319e89466d08eab5ff20e9a5a /src/script
parent4d3d85e1a9de727329e8a8df3b572a778e2da6e2 (diff)
downloadQt-00f01532342713e4adae0ce8ccd332829acfeec0.zip
Qt-00f01532342713e4adae0ce8ccd332829acfeec0.tar.gz
Qt-00f01532342713e4adae0ce8ccd332829acfeec0.tar.bz2
Improve test coverage of QtScript translation functions
And fix two silly typos in the error messages.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index ccd3e56..9bd98f1 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -663,7 +663,7 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
else if (encStr == QLatin1String("UnicodeUTF8"))
encoding = QCoreApplication::UnicodeUTF8;
else
- return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("qsTranslate(): invalid encoding '%s'").arg(encStr));
+ return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("qsTranslate(): invalid encoding '%0'").arg(encStr));
}
int n = -1;
if (args.size() > 4)
@@ -697,7 +697,7 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS
if ((args.size() > 1) && !args.at(1).isString())
return JSC::throwError(exec, JSC::GeneralError, "qsTr(): second argument (comment) must be a string");
if ((args.size() > 2) && !args.at(2).isNumber())
- return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number");
+ return JSC::throwError(exec, JSC::GeneralError, "qsTr(): third argument (n) must be a number");
#ifndef QT_NO_QOBJECT
QString context;
// The first non-empty source URL in the call stack determines the translation context.