[KDE/Mac] Review Request 120800: prevent starting a QTimer with a negative interval

Dan Vrátil dvratil at redhat.com
Mon Oct 27 08:30:22 UTC 2014



> On Oct. 26, 2014, 8:33 p.m., Dan Vrátil wrote:
> > Thanks! We don't need the debug really, so you can just wrap the expression in start() to qMax(0, ....), which will ensure the same.
> 
> René J.V. Bertin wrote:
>     Isn't that a macro which would cause the expression (incl. timer query) to be evaluated twice?

Hmm, yes. But the methods are inlined and the entire expression are just arithmetical operations, so compiler can optimize and the difference between doing the calculation twice, and storing it temporarily in variable will be close to none.


- Dan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120800/#review69169
-----------------------------------------------------------


On Oct. 25, 2014, 10:52 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120800/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2014, 10:52 p.m.)
> 
> 
> Review request for Akonadi and KDE Software on Mac OS X.
> 
> 
> Repository: akonadi
> 
> 
> Description
> -------
> 
> After waking my Mac from (a night's) sleep, I noticed a quickly repeating error message about starting a QTimer with a negative interval. I could trace this to the PausableTimer instance in collectionscheduler.cpp .
> The attached patch prevents the error condition by clipping the calculated remaining time interval to 0 .
> I've left a debug statement that can of course doesn't need to be committed.
> 
> 
> Diffs
> -----
> 
>   server/src/collectionscheduler.cpp 8d4cd5c 
> 
> Diff: https://git.reviewboard.kde.org/r/120800/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.6.8 with kdelibs 4.14.2 and kdepim* 4.13.3
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20141027/9014db2a/attachment.html>


More information about the kde-mac mailing list