diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-19 17:47:57 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-19 17:59:00 (GMT) |
commit | 7404b1124022510fb39b204c8fd0d41dc738b180 (patch) | |
tree | 335452bd15828f0ddefe3dac02d07efaaf7e6165 /src/script/api/qscriptengine.cpp | |
parent | 3f9a1230e32cb43d61c8d42c9bcb2beb322f6583 (diff) | |
download | Qt-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.cpp | 18 |
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; |