Details
Description
Under Qt4.6.1, the scripting instanceof operator fails with the right-hand-side of the operator is an object created by QScriptEngine::newQMetaObject(). This used to work, as of Qt4.5.2.
The attached example application demonstrates this problem. If you build and run it, it will bring up the interactive script interpreter example. Then, do the following:
var a = new A();
a.sayHello(); // makes sure the underlying slots of C++ type A are exposed.
print( a instanceof A );
The last line generates the following error:
TypeError: Result of expression 'A' [[object QMetaObject]] is not a valid argument for 'instanceof'.