QSGLoader shouldn't load component when active is false
authorChris Adams <christopher.adams@nokia.com>
Thu, 6 Oct 2011 04:37:09 +0000 (14:37 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 6 Oct 2011 06:17:18 +0000 (08:17 +0200)
commit0db214e51ac36d5ce5499c52cf4054b81e910bbb
tree58b0a9f1002d67df48ebc2a1f9390937917ef196
parente503a51856db7ecb93bdc02b00ba0e4d78273278
QSGLoader shouldn't load component when active is false

Previously, QSGLoader still loaded the component specified, but didn't
instantiate the item. This commit ensures that no component is loaded
from the source, and that the onLoaded signal is emitted only when
loading occurs (when the loader is active).

Task-number: QTBUG-21710
Change-Id: I2d83603ef84d6942fb84141e9e146d2cf9654fc4
Reviewed-on: http://codereview.qt-project.org/5915
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/declarative/items/qsgloader.cpp
src/declarative/items/qsgloader_p_p.h
tests/auto/declarative/qsgloader/data/active.7.qml [new file with mode: 0644]
tests/auto/declarative/qsgloader/data/active.8.qml [new file with mode: 0644]
tests/auto/declarative/qsgloader/tst_qsgloader.cpp