Commit f9c314aa306bfd4a237594775a8aeb14c858e66d

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
src/gui/kernel/qwidget.cpp
(2 / 1)
  
14481448 // notify the window it no longer has a surface.
14491449 delete d->extra->topextra->backingStore;
14501450 d->extra->topextra->backingStore = 0;
1451 } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
1451 }
1452 if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
14521453 bs->removeDirtyWidget(this);
14531454 if (testAttribute(Qt::WA_StaticContents))
14541455 bs->removeStaticWidget(this);

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment