summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-12-09 10:58:14 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-10 16:11:42 +0100
commita6ae75f92a8628c727a9c5a9961fa91c583c008e (patch)
tree7a6ee9f7b80126fc1616043fa12ff9fe66d45619 /src/corelib/kernel/qobject.h
parentfb8dc15ba6d24452d819ab40b1dd4227e36a9c2c (diff)
Don't overload the meaning of QObjectData::wasDeleted
The union in QObjectPrivate of declarativeData and currentChildBeingDeleted shouldn't use wasDeleted to determining the meaning of the unioned pointer. Instead, add QObjectData::isDeletingChildren, set that in QObjectPrivate::deleteChildren(), and only use the currentChildBeingDeleted member when the parent's isDeletingChildren is set. This solves aborts seen in autotests when widgets are deleting window children. The abort comes from QWeakPointer on the parent in the child's close event handler (the abort checks that wasDeleted is not set). Change-Id: I1a58449159d4a5312aad8ba12e559d05d6c43d93 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 307518d81e..cc2ccb9e5b 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -99,6 +99,7 @@ public:
uint pendTimer : 1;
uint blockSig : 1;
uint wasDeleted : 1;
+ uint isDeletingChildren : 1;
uint ownObjectName : 1;
uint sendChildEvents : 1;
uint receiveChildEvents : 1;