diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2009-06-16 13:43:46 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-31 02:00:41 (GMT) |
commit | 45c11a97a32170d0c6ab9265a102cc8d94fa63ee (patch) | |
tree | c1e219a25bbc3f9d7e4749e570e3ad4c28e23bf0 | |
parent | 025dcc2bb9651708d456a5b1e5d2888e67d67bf4 (diff) | |
download | Qt-45c11a97a32170d0c6ab9265a102cc8d94fa63ee.zip Qt-45c11a97a32170d0c6ab9265a102cc8d94fa63ee.tar.gz Qt-45c11a97a32170d0c6ab9265a102cc8d94fa63ee.tar.bz2 |
Fixing qml for QWidget support (crash)
QWidget deletes its children in its own constructor so we have
to cleanup before explicitly
Reviewed-by: Aaron Kennedy
(cherry picked from commit 59629ac728f2fdbc3047554d715e2f908b1844c4)
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index bca607c..e24b7cb 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1375,6 +1375,12 @@ QWidget::~QWidget() // set all QPointers for this object to zero QObjectPrivate::clearGuards(this); + if(d->declarativeData) { + QDeclarativeData *dd = d->declarativeData; + d->declarativeData = 0; + dd->destroyed(this); + } + if (!d->children.isEmpty()) d->deleteChildren(); |