summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-19 17:47:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-19 17:59:00 (GMT)
commit7404b1124022510fb39b204c8fd0d41dc738b180 (patch)
tree335452bd15828f0ddefe3dac02d07efaaf7e6165 /src/script/api/qscriptengine.cpp
parent3f9a1230e32cb43d61c8d42c9bcb2beb322f6583 (diff)
downloadQt-7404b1124022510fb39b204c8fd0d41dc738b180.zip
Qt-7404b1124022510fb39b204c8fd0d41dc738b180.tar.gz
Qt-7404b1124022510fb39b204c8fd0d41dc738b180.tar.bz2
Cleanups
Remove useless variable. Use QBoolBlocker instread of custom QScript::InEval.
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 3556c05..0e47cde 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -788,22 +788,6 @@ static QScriptValue __setupPackage__(QScriptContext *ctx, QScriptEngine *eng)
}
#endif
-// Helper class for stacking a script engine's inEval attribute.
-class InEval
-{
-public:
- inline InEval(QScriptEnginePrivate *e)
- : engine(e), was(e->inEval)
- {
- e->inEval = true;
- }
- inline ~InEval()
- { engine->inEval = was; }
-private:
- QScriptEnginePrivate *engine;
- bool was;
-};
-
} // namespace QScript
QScriptEnginePrivate::QScriptEnginePrivate()
@@ -2170,7 +2154,7 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file
Q_D(QScriptEngine);
JSC::JSLock lock(false); // ### hmmm
- QScript::InEval inEval(d);
+ QBoolBlocker inEval(d->inEval, true);
currentContext()->activationObject(); //force the creation of a context for native function;
JSC::UString jscProgram = program;