diff options
author | Martin Jones <martin.jones@jollamobile.com> | 2014-08-09 22:01:08 +1000 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2014-08-11 13:03:19 +0200 |
commit | 01c6af3fc940378e8eee41a9fb8273420ef5a7e1 (patch) | |
tree | 6cf3a1a4a060899837a75268654fa8ee9026a910 /tests/auto/qml | |
parent | e823bb5aee09c8a9f4a11bfd9ab6c68d2a77e93e (diff) |
Avoid double deletion when deleting an incubating component.
The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing
the guards in QQmlIncubatorPrivate::incubate() when a deletion was
detected.
If we detect a deletion, leave the guards in place, to be handled in
QQmlIncubatorPrivate::clear().
Task-number: QTBUG-40685
Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml')
-rw-r--r-- | tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp index 0b9872f94c..75b10ed804 100644 --- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp +++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp @@ -171,10 +171,6 @@ void tst_qqmlincubator::objectDeleted() controller.incubateWhile(&b); } - // We have to cheat and manually remove it from the creator->allCreatedObjects - // otherwise we will do a double delete - QQmlIncubatorPrivate *incubatorPriv = QQmlIncubatorPrivate::get(&incubator); - incubatorPriv->creator->allCreatedObjects().pop(); delete SelfRegisteringType::me(); { |