summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-05 12:59:16 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-05 13:13:35 (GMT)
commitf9c314aa306bfd4a237594775a8aeb14c858e66d (patch)
treecf7128232bfd631d7dfb3c42db4f4a21f45dca24 /src/gui/kernel
parentfc58ceb0041626baa95d00eaaa2e740171d4767c (diff)
downloadQt-f9c314aa306bfd4a237594775a8aeb14c858e66d.zip
Qt-f9c314aa306bfd4a237594775a8aeb14c858e66d.tar.gz
Qt-f9c314aa306bfd4a237594775a8aeb14c858e66d.tar.bz2
Fix tst_QAccessiblity failure.
This started to fail after 34f1758428282a327c12b0d8040061c1f67ecc7f. Or actually, the test crashes on my machine. Reason is that the the test first creates a top-level line edit (which then gets its own backing store). The line edit is then reparented into another top-level. When the line edit is destroyed extra->topextra->backingStore is true and we delete the backing store it first got when created as a top-level. However, the line edit was reparented so this backing store is not the "active" one. We should still delete topextra->backingstore, but we must also remove any pointer references to the line edit in the "active" backing store. Reviewed-by: jbarron
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 4520a1b..8b8768c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1448,7 +1448,8 @@ QWidget::~QWidget()
// notify the window it no longer has a surface.
delete d->extra->topextra->backingStore;
d->extra->topextra->backingStore = 0;
- } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
+ }
+ if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
bs->removeDirtyWidget(this);
if (testAttribute(Qt::WA_StaticContents))
bs->removeStaticWidget(this);