summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-06-07 15:06:53 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-06-07 15:50:54 +0200
commit71304aefd0668f6ba2d41ef84d7f48aaa95db06f (patch)
tree5bddc05aead8caabebfbdefaebce96c063669f12 /src
parent779e1aaa352ff7a11b4ea51e3247477e1dfa16b4 (diff)
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')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 2867fdc45f..4bf8d5dd73 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -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()) {