Fix QJSEngine::newQObject ownership behaviour
authorSimon Hausmann <simon.hausmann@nokia.com>
Fri, 29 Jul 2011 14:04:26 +0000 (16:04 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 6 Oct 2011 08:44:27 +0000 (10:44 +0200)
commitab989615c05bbf15ef7f5b91d3daaf2423a490ea
tree93a5814dd4b62acacd772aad6fb23656c345138b
parent6e7ea2fc3823cb13a366845efe32050b9adefffb
Fix QJSEngine::newQObject ownership behaviour

Ensure the indestructible flag is set to false for objects wrapped through
QJSEngine::newQObject, to ensure that they get deleted upon gc when they
don't have a parent.

Re-enabled the QJSEngine::garbageCollect and ownership auto-tests that verified
this behaviour.

Change-Id: I181bff0cc44d071d650a2f73494e49cce6ad538e
Reviewed-on: http://codereview.qt-project.org/2398
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
src/declarative/qml/v8/qjsengine.cpp
src/declarative/qml/v8/qv8engine_p.h
tests/auto/declarative/qjsengine/tst_qjsengine.cpp