summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-27 12:52:37 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-27 12:52:37 (GMT)
commitf5af458153471d3788fe5abe5e6b5d9749ba42fe (patch)
treecb3116a68ecd619a11870f53d436edc93de676fa /src/script
parentc068efe3b63508e9a805674ac787e23a953ca5cb (diff)
downloadQt-f5af458153471d3788fe5abe5e6b5d9749ba42fe.zip
Qt-f5af458153471d3788fe5abe5e6b5d9749ba42fe.tar.gz
Qt-f5af458153471d3788fe5abe5e6b5d9749ba42fe.tar.bz2
use scriptEngineFromExec() in a few more places
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 7ffb178..a54d029 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -452,7 +452,7 @@ JSC::JSValue functionDisconnect(JSC::ExecState *exec, JSC::JSObject */*callee*/,
return JSC::throwError(exec, JSC::TypeError, QScript::qtStringToJSCUString(message));
}
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
JSC::JSValue receiver;
JSC::JSValue slot;
@@ -535,7 +535,7 @@ JSC::JSValue functionConnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JS
}
}
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
JSC::JSValue receiver;
JSC::JSValue slot;
@@ -696,7 +696,7 @@ JSC::JSValue functionPrint(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, c
JSC::JSValue functionGC(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&)
{
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
engine->collectGarbage();
return JSC::jsUndefined();
}