Clean up a partially scrolled QRollEffect widget

If the associated widget pointer got zeroed while QRollEffect was
scrolling, the partially scrolled QRollEffect widget remained on
screen indefinitely as 'done' was never set to true.

Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Miikka Heikkinen 2012-06-14 13:05:34 +03:00 committed by Qt by Nokia
parent ba7f664a7f
commit 486601fbc4

View File

@ -533,7 +533,7 @@ void QRollEffect::scroll()
setUpdatesEnabled(true); setUpdatesEnabled(true);
repaint(); repaint();
} }
if (done) { if (done || !widget) {
anim.stop(); anim.stop();
qApp->removeEventFilter(this); qApp->removeEventFilter(this);
if (widget) { if (widget) {