Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.0.0 Beta 1
-
None
-
gcc (Debian 4.7.1-7) 4.7.1
Description
The following code
#include <QCoreApplication> #include <QtScript> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QScriptEngine *engine = new QScriptEngine(&a); QScriptContext *ctx = engine->pushContext(); ctx->activationObject().setProperty("Egon", engine->newVariant("Olsen")); qDebug() << engine->evaluate("Egon").toString(); engine->pushContext(); qDebug() << engine->evaluate("Egon").toString(); engine->popContext(); engine->popContext(); return 0; }
produces in Qt 4.8 the output
"Olsen" "Olsen"
and in Qt 5.0
"Olsen" "ReferenceError: Can't find variable: Egon"
Attachments
Issue Links
- relates to
-
QTBUG-18188 [Reg] Contexts created with QScriptEngine::pushContext() are not clean
-
- Closed
-