summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-06-06 12:37:55 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-06-06 12:38:41 +0200
commit0273bc5d22cd1fa08854b023f9b6c318fc75f3fa (patch)
tree3b4c9c98b119b9a64af0ceb7ebd0b9cdc5ece73f /src
parentd75a9444aa9a0d8a5988c8b7d79aec87fb2727e9 (diff)
Made tst_QWidget::repaintWhenChildDeleted() pass.
Implement some missing functionality in QWidget::destroy().
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 169977db25..2867fdc45f 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -150,12 +150,18 @@ 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);
if (this == QApplicationPrivate::active_window)
QApplication::setActiveWindow(0);
+ setAttribute(Qt::WA_WState_Created, false);
+
if (windowType() != Qt::Desktop) {
if (destroySubWindows) {
QObjectList childList(children());
@@ -175,6 +181,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
d->hide_sys();
}
}
+
+ d->setWinId(0);
}
}