diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2009-06-16 13:43:46 (GMT) |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2009-06-16 13:54:10 (GMT) |
commit | 59629ac728f2fdbc3047554d715e2f908b1844c4 (patch) | |
tree | 1294f0e0eec2037147c5c6e1f60904e57fefaafe /src | |
parent | 7e6f67dd9a177c56fdf190b9657294d73776863f (diff) | |
download | Qt-59629ac728f2fdbc3047554d715e2f908b1844c4.zip Qt-59629ac728f2fdbc3047554d715e2f908b1844c4.tar.gz Qt-59629ac728f2fdbc3047554d715e2f908b1844c4.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
Diffstat (limited to 'src')
-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 d5fdd93..74703bf 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1372,6 +1372,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(); |