<table><tr><td style="">rjvbb created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7640" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Debugging an unrelated timer issue with GammaRay I noticed QtCurve can have multiple progressbar timers active in more complex applications like KDevelop even when progressbar aren't being animated (or are in fact not being shown/active). Progressbar timers run at 20Hz, which seems a bit fast for idling.</p>
<p>This patch introduces a rather basic improvement. The progressbar timer is started at an idling frequency of 2Hz unless it's being started for a progressbar which requires animation. It will then be set to the working frequency in the timerEvent callback, if and only if there are progressbars to be animated.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Works as expected. There's a small hickup when a progressbar is switched to animated (or "busy") mode, but one that ought to be hardly noticeable in real life.</p>
<p>The current version of the patch has hysteresis: timers are never switched back to idling frequency. I'm looking how much more complex the code becomes when they're turned back down as soon as there are no more animated progressbars.</p>
<p>NB: I'm not entirely certain why multiple timers would be active, it seems there ought only be a single one per process.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R626 QtCurve</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7640" rel="noreferrer">https://phabricator.kde.org/D7640</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>qt4/style/qtcurve.cpp<br />
qt4/style/qtcurve.h<br />
qt5/style/qtcurve.h<br />
qt5/style/qtcurve_api.cpp<br />
qt5/style/qtcurve_p.h</div></div></div><br /><div><strong>To: </strong>rjvbb, yuyichao, Plasma<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>