push/pop a context when loading
svn path=/trunk/KDE/kdelibs/; revision=1159708
This commit is contained in:
parent
36c90e7137
commit
ae26e2a87c
@ -196,9 +196,11 @@ bool loadScript(const QString &path, const QString &prefix)
|
||||
QString tmp(buffer.readAll());
|
||||
|
||||
QScriptEngine *engine = AnimationScriptEngine::globalEngine();
|
||||
engine->pushContext();
|
||||
s_prefix = prefix;
|
||||
QScriptValue def(engine->evaluate(tmp, path));
|
||||
s_prefix.clear();
|
||||
engine->popContext();
|
||||
if (engine->hasUncaughtException()) {
|
||||
const QScriptValue error = engine->uncaughtException();
|
||||
QString file = error.property("fileName").toString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user