Fixed resource leak when setting QProgressBar style sheet

Task-number: QTBUG-19110

Merge-request: 2687
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit ecd78168271cfe71715e074a50752712f4aa3229)

Change-Id: I49fdf0f74b903313089eb8cd778c80a19d34b461
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
This commit is contained in:
Tero Ahola 2011-10-10 17:02:33 +02:00 committed by Qt by Nokia
parent 92740638df
commit abf25d3f64

View File

@ -218,7 +218,8 @@ bool QWindowsStyle::eventFilter(QObject *o, QEvent *e)
d->bars << bar;
if (d->bars.size() == 1) {
Q_ASSERT(d->animationFps> 0);
d->animateTimer = startTimer(1000 / d->animationFps);
if (d->animateTimer == 0)
d->animateTimer = startTimer(1000 / d->animationFps);
}
}
}