summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-06-07 13:06:53 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-20 06:04:45 (GMT)
commitdc80dfd80ce83ca32f7a6e1a3880d46d1004c573 (patch)
tree7179b6934e7fd406a42a4ac00858570ae857c778 /src/gui/kernel/qwidget_qpa.cpp
parentc1b9b024f8e5396ad8ce15be6e8528ed87e54fe5 (diff)
downloadQt-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.cpp2
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()) {