Fix crash on shutdown with states
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 15 Mar 2014 09:03:02 +0000 (10:03 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 15 Mar 2014 15:00:38 +0000 (16:00 +0100)
commitaf41170bc5e4c1be194bb9bbe883b00c2f7062b7
tree60d7d2a502972ccc96c9cab0893de194a89078dc
parent3affc261aaa12105dbad60bfa7014126ce4dfcca
Fix crash on shutdown with states

When populating deferred properties, we must not set the rootObjectInCreation
flags on the root context and (consequently) on any sub-objects objects created
when initializing deferred properties. Doing so otherwise will end up us
incorrectly linking QQmlContextData together, causing QQmlData::linkedContext
to point to iself and crash on exit upon deletion.

Task-number: QTBUG-37484
Change-Id: Ia5dc92a04e0f66499f15fbac10f14859d387b021
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlobjectcreator.cpp
tests/auto/qml/qqmllanguage/data/SubType.qml [new file with mode: 0644]
tests/auto/qml/qqmllanguage/data/rootObjectInCreationNotForSubObjects.qml [new file with mode: 0644]
tests/auto/qml/qqmllanguage/testtypes.cpp
tests/auto/qml/qqmllanguage/testtypes.h
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp