From e4d03c6b56decd63035a7c46498dae2d2a483c09 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 14 Apr 2010 13:03:38 +0300 Subject: QS60Style: Sometimes progressbars do not animate Style removes every progressbar from animation list whenever *any* QWidget is hidden/shown. To ensure that the animation list is only tempered with possible animation supporting qwidgets, re-interpret cast them to QProgressBar. If this works, then clear the animation list. Task-number: QTBUG-9836 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 28cbc45..f154b2d 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3313,8 +3313,10 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event) break; case QEvent::Destroy: case QEvent::Hide: - d->stopAnimation(QS60StyleEnums::SP_QgnGrafBarWaitAnim); - d->m_bars.removeAll(reinterpret_cast(object)); + if (QProgressBar *bar = reinterpret_cast(object)) { + d->stopAnimation(QS60StyleEnums::SP_QgnGrafBarWaitAnim); + d->m_bars.removeAll(bar); + } break; default: break; -- cgit v0.12