Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.5.3
-
None
-
537bff8c020c8fd2c150b2821d1cc035ee96f84f
Description
In the QWindowsStyle there is a List of pointers to existing QProgressBars. Each time you change the stylesheet of a copy of each QProgressBars pointers will be added to this list. QWindowsStyle should see if the list contains the pointer already before appending.
Attached is a test case that demonstrates this. Watching the size of the bars list from inside QWindowsStyle::timerEvent will show the growth.
--- src/gui/styles/qwindowsstyle.cpp 2009-12-01 15:05:07.112689436 +0100 +++ src/gui/styles/qwindowsstyle.cpp 2009-12-01 14:56:35.947190348 +0100 @@ -222,7 +222,9 @@ case QEvent::StyleChange: case QEvent::Show: if (QProgressBar *bar = qobject_cast<QProgressBar *>(o)) { - d->bars << bar; + if (!d->bars.contains(bar)){ + d->bars << bar; + } if (d->bars.size() == 1) { Q_ASSERT(d->animationFps> 0); d->animateTimer = startTimer(1000 / d->animationFps);