-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.4.0
-
None
QScriptEngine firstEngine;
QScriptEngine twoEngine;
firstEngine.evaluate(
"function see(a){"
" print ('typeof a = '+ typeof a); "
" print ('typeof a.test = '+ typeof a.test); "
" print(' a = ' + a ); "
"}"
);
{
QScriptValue argsCall = twoEngine.newArray(1);
argsCall.setProperty("0", 5 );
firstEngine.globalObject().property("see").call(
firstEngine.globalObject(),
argsCall
);
}
{
QScriptValue argsCall = twoEngine.newArray(1);
QScriptValue args1_obj = twoEngine.newObject();
args1_obj.setProperty("test","1");
argsCall.setProperty("0", args1_obj );
firstEngine.globalObject().property("see").call(
firstEngine.globalObject(),
argsCall
);
}
Result of run code :
typeof a = number
typeof a.test = undefined
a = 5
typeof a = object
typeof a.test = undefined
But this is code should throw some errors, because call to QScriptEngine::call arguments not belong engine for this.
Sorry, i'm use translate.google.com (