summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine_p.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-30 19:50:17 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-31 14:11:29 (GMT)
commitbb1e71ac344b184d2ab13cd0ed7188eebb34aaf1 (patch)
treee2481d6ab859207c3cef2dd2822f9e0cb65da5cd /src/script/api/qscriptengine_p.h
parentf6713c0e69d2b2b20da00e9a9a4e23a8f4f85c3d (diff)
downloadQt-bb1e71ac344b184d2ab13cd0ed7188eebb34aaf1.zip
Qt-bb1e71ac344b184d2ab13cd0ed7188eebb34aaf1.tar.gz
Qt-bb1e71ac344b184d2ab13cd0ed7188eebb34aaf1.tar.bz2
Small Refactoring of QScript
- Create a scope (activation object) for the native constructor in QScriptClass - put the isCalledasConstructor in the activation object (so i can clean up the QScriptContext - Remove the code duplication in all native functions. Aknoweldged-by: Kent
Diffstat (limited to 'src/script/api/qscriptengine_p.h')
-rw-r--r--src/script/api/qscriptengine_p.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index bc6acfa..ced49bb 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -234,6 +234,24 @@ public:
#endif
};
+namespace QScript
+{
+/*! \internal
+ Helper class to create QScriptActivationObject.
+ To be used on the stack
+*/
+class QScriptPushScopeHelper
+{
+ public:
+ QScriptPushScopeHelper(JSC::CallFrame *newFrame, bool calledAsConstructor = false);
+ ~QScriptPushScopeHelper();
+ private:
+ QScriptEnginePrivate *engine;
+ JSC::CallFrame *previousFrame;
+};
+} // namespace QScript
+
+
QT_END_NAMESPACE
#endif // QT_NO_SCRIPT