diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-06-07 13:06:53 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-20 06:04:45 (GMT) |
commit | dc80dfd80ce83ca32f7a6e1a3880d46d1004c573 (patch) | |
tree | 7179b6934e7fd406a42a4ac00858570ae857c778 /src/gui/kernel/qwidget_qpa.cpp | |
parent | c1b9b024f8e5396ad8ce15be6e8528ed87e54fe5 (diff) | |
download | Qt-dc80dfd80ce83ca32f7a6e1a3880d46d1004c573.zip Qt-dc80dfd80ce83ca32f7a6e1a3880d46d1004c573.tar.gz Qt-dc80dfd80ce83ca32f7a6e1a3880d46d1004c573.tar.bz2 |
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: Samuel
Diffstat (limited to 'src/gui/kernel/qwidget_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 68b0645..ab1058f 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -132,6 +132,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); @@ -420,6 +421,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()) { |