See http://frinring.wordpress.com/2011/08/09/beware-of-qscriptvalue-and-qt_no_cast_from_ascii-or-structure-descriptions-in-js-broken-in-okteta-0-7-0/
In Qt 5 the QScriptValue(bool) constructor could be changed to take a QBool to prevent implicit casting.