D7640: QtCurve: reduce progressbar timer overhead

Yichao Yu noreply at phabricator.kde.org
Sat Sep 2 01:42:39 UTC 2017


yuyichao added a comment.


  > Style::drawControl() is const, so one also has to move m_timer, m_progressBarAnimateTimer and m_progressBarAnimateFps to a private class, which in addition would have to have a q pointer and a startParentTimer() "proxy" so we can call Style::startTimer() from a const member function.
  
  This should not be necessary. You can add `mutable` or do const cast for certain members.
  
  The logic seems sound so LGTM given the tests done.

INLINE COMMENTS

> qtcurve.cpp:2701
>                      m_timer.start();
> -                    m_progressBarAnimateTimer = startTimer(1000 / constProgressBarFps);
> +                // set the short interval when required, otherwise a less expensive "idling" interval
> +                // that still maintains a reasonable reaction time when a progress bar is toggled

Indent a bit strange?

REPOSITORY
  R626 QtCurve

REVISION DETAIL
  https://phabricator.kde.org/D7640

To: rjvbb, yuyichao, #plasma
Cc: davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170902/74fd0e21/attachment.html>


More information about the Plasma-devel mailing list