Do not permit excessive recursion in component creation
authorMatthew Vogt <matthew.vogt@nokia.com>
Thu, 5 Jul 2012 23:53:03 +0000 (09:53 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 9 Jul 2012 02:01:19 +0000 (04:01 +0200)
commit19c0a31319148d4ac716f7cb3295891b5a3b20d9
treeec01ac1d68d4888c58a4f3b4f547a287a4c7491d
parent49a3883e86b61d8facfeea9c43037d484cb50b92
Do not permit excessive recursion in component creation

Limit recursion during component creation to prevent infinite
recursion resulting in a crash.  Recursion results from invoking
createObject() in the Component.onCompleted handler.

Task-number: QTBUG-25439
Change-Id: Ica2ba099d82b5747c938501af04e67f7ace8402e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlcomponent_p.h
tests/auto/qml/qqmlcomponent/data/RecursiveComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlcomponent/data/recursion.qml [new file with mode: 0644]
tests/auto/qml/qqmlcomponent/data/recursionContinuation.qml [new file with mode: 0644]
tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp