diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-04-14 10:03:38 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-04-14 10:03:38 (GMT) |
commit | e4d03c6b56decd63035a7c46498dae2d2a483c09 (patch) | |
tree | 3e9a362c1b10248afe0965de88620bf325297185 /src/gui | |
parent | f610bcbf590a86ec1e8fef930e279ec5cd2fcfe5 (diff) | |
download | Qt-e4d03c6b56decd63035a7c46498dae2d2a483c09.zip Qt-e4d03c6b56decd63035a7c46498dae2d2a483c09.tar.gz Qt-e4d03c6b56decd63035a7c46498dae2d2a483c09.tar.bz2 |
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
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 6 |
1 files 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<QProgressBar *>(object)); + if (QProgressBar *bar = reinterpret_cast<QProgressBar *>(object)) { + d->stopAnimation(QS60StyleEnums::SP_QgnGrafBarWaitAnim); + d->m_bars.removeAll(bar); + } break; default: break; |