Add QJSValue::callWithInstance() function
authorKent Hansen <kent.hansen@nokia.com>
Wed, 18 Jan 2012 13:01:39 +0000 (14:01 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 20 Jan 2012 22:35:18 +0000 (23:35 +0100)
commit174ee897edbea436046cfe0ea02f4185e1e0de34
tree5ec724de6413a6ff4aaf196489cec39f8739956c
parent95cee5d6e514891aab160c8e1fc4814c147ab3a6
Add QJSValue::callWithInstance() function

With the deprecated call() overload, it was confusing what the first
argument was (the this-object or an actual argument passed to the
function). Introduce a dedicated function for the
"explicit this-object" case. This makes code more readable, and
eliminates the need to pass a "dummy" this-object to call() in the
quite common case where you don't care about the this-object.

Task-number: QTBUG-23604
Change-Id: I18f8be6592a848436351516bea266fc7e9195777
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
src/declarative/qml/v8/qjsvalue.cpp
src/declarative/qml/v8/qjsvalue.h
tests/auto/declarative/qjsengine/tst_qjsengine.cpp
tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp