summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-06-06 10:37:55 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-20 06:04:45 (GMT)
commitc1b9b024f8e5396ad8ce15be6e8528ed87e54fe5 (patch)
tree201b6448d8a070c46cb3f8b8db9c8cb9fafbc34f
parent1b413c8821d127a8541134d7ec5306bf135ff942 (diff)
downloadQt-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)
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp8
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);
}
}