summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptcontextinfo.cpp
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-18 09:01:33 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-18 09:15:11 (GMT)
commit60ad9486a959ac1beb9b850be18fbb787173cfa0 (patch)
treea9b080f78861ed9d9bcb745d84e320bcc57326a4 /src/script/api/qscriptcontextinfo.cpp
parent4d92ed2203ced87802e3e91e530209619d7d2e71 (diff)
downloadQt-60ad9486a959ac1beb9b850be18fbb787173cfa0.zip
Qt-60ad9486a959ac1beb9b850be18fbb787173cfa0.tar.gz
Qt-60ad9486a959ac1beb9b850be18fbb787173cfa0.tar.bz2
Clean up.
Get rid of conversion functions QScript::qtStringFromJSCUString and QScript::qtStringToJSCUString. Code was moved to cast operators. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptcontextinfo.cpp')
-rw-r--r--src/script/api/qscriptcontextinfo.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index 294c48a..bd121a1 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -97,11 +97,6 @@ QT_BEGIN_NAMESPACE
\value NativeFunction The function is a built-in Qt Script function, or it was defined through a call to QScriptEngine::newFunction().
*/
-namespace QScript
-{
-QString qtStringFromJSCUString(const JSC::UString &str);
-}
-
class QScriptContextInfoPrivate
{
Q_DECLARE_PUBLIC(QScriptContextInfo)
@@ -187,13 +182,13 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
if (codeBlock) {
JSC::SourceProvider *source = codeBlock->source();
scriptId = source->asID();
- fileName = QScript::qtStringFromJSCUString(source->url());
+ fileName = source->url();
}
// Get the others informations:
JSC::JSObject *callee = frame->callee();
if (callee && callee->isObject(&JSC::InternalFunction::info))
- functionName = QScript::qtStringFromJSCUString(JSC::asInternalFunction(callee)->name(&frame->globalData()));
+ functionName = JSC::asInternalFunction(callee)->name(&frame->globalData());
if (callee && callee->isObject(&JSC::JSFunction::info)) {
functionType = QScriptContextInfo::ScriptFunction;
JSC::FunctionBodyNode *body = JSC::asFunction(callee)->body();
@@ -201,7 +196,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
functionEndLineNumber = body->lastLine();
const JSC::Identifier* params = body->parameters();
for (size_t i = 0; i < body->parameterCount(); ++i)
- parameterNames.append(QScript::qtStringFromJSCUString(params[i].ustring()));
+ parameterNames.append(params[i].ustring());
// ### get the function name from the AST
} else if (callee && callee->isObject(&QScript::QtFunction::info)) {
functionType = QScriptContextInfo::QtFunction;