I wrote a simple program to demonstrate the problems.
On Qt4.6, I got output:
QScriptValue::setScriptClass() failed: cannot change class of non-QScriptObject
"method1" Fail: 100
"method2" Fail: 100
"method3" OK
"method4" Fail: 100
"method5" OK
On Qt4.5, I got output:
"method1" OK
"method2" OK
"method3" OK
"method4" OK
"method5" OK