reset certain global variables on deletion
qt_button_down needs to be reset to 0 if it points to the widget being deleted. Reviewed-by: Samuelbb10
parent
779e1aaa35
commit
71304aefd0
|
|
@ -153,6 +153,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
|
|||
d->aboutToDestroy();
|
||||
if (!isWindow() && parentWidget())
|
||||
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
|
||||
d->deactivateWidgetCleanup();
|
||||
|
||||
if ((windowType() == Qt::Popup))
|
||||
qApp->d_func()->closePopup(this);
|
||||
|
|
@ -470,6 +471,7 @@ void QWidgetPrivate::hide_sys()
|
|||
{
|
||||
Q_Q(QWidget);
|
||||
q->setAttribute(Qt::WA_Mapped, false);
|
||||
deactivateWidgetCleanup();
|
||||
if (!q->isWindow()) {
|
||||
QWidget *p = q->parentWidget();
|
||||
if (p &&p->isVisible()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue