diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-06 10:37:55 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-20 06:04:45 (GMT) |
commit | c1b9b024f8e5396ad8ce15be6e8528ed87e54fe5 (patch) | |
tree | 201b6448d8a070c46cb3f8b8db9c8cb9fafbc34f /src/gui/kernel | |
parent | 1b413c8821d127a8541134d7ec5306bf135ff942 (diff) | |
download | Qt-c1b9b024f8e5396ad8ce15be6e8528ed87e54fe5.zip Qt-c1b9b024f8e5396ad8ce15be6e8528ed87e54fe5.tar.gz Qt-c1b9b024f8e5396ad8ce15be6e8528ed87e54fe5.tar.bz2 |
Made tst_QWidget::repaintWhenChildDeleted() pass.
Implement some missing functionality in QWidget::destroy().
(cherry picked from commit 0273bc5d22cd1fa08854b023f9b6c318fc75f3fa)
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index c7ce99a..68b0645 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -129,6 +129,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); + if (!isWindow() && parentWidget()) + parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); + if ((windowType() == Qt::Popup)) qApp->d_func()->closePopup(this); @@ -136,6 +140,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (this == QApplicationPrivate::active_window) QApplication::setActiveWindow(0); + setAttribute(Qt::WA_WState_Created, false); + if (windowType() != Qt::Desktop) { if (destroySubWindows) { QObjectList childList(children()); @@ -155,6 +161,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) d->hide_sys(); } } + + d->setWinId(0); } } |