Made tst_QWidget::repaintWhenChildDeleted() pass.

Implement some missing functionality in QWidget::destroy().
This commit is contained in:
Samuel Rødal 2011-06-06 12:37:55 +02:00
parent d75a9444aa
commit 0273bc5d22

View File

@ -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);
}
}