On Tuesday August 29 2017 02:02:59 Gabriel de Dietrich wrote: >FYI: QCocoaMenu: Stop update timer >(Merged)<https://codereview.qt-project.org/203791>
Thanks for the heads-up. > >On Aug 29, 2017, at 9:00 AM, Thiago Macieira ><[email protected]<mailto:[email protected]>> wrote: > >On Monday, 28 August 2017 17:06:18 PDT René J.V. Bertin wrote: > killTimer(m_updateTimer); >Yeah, if you don't kill the timer, it will keep firing. Which we just rediscovered :) Funny though, apparently 1 misdirected startTimer() call can turn any application in a CPU hog that burns cycles without ever doing anything. Wouldn't it be safer for QObject::timerEvent() to kill any timer that triggers it, possibly even do an abort if it can do some kind of runtime debug mode detection? At least then it's set to a 0 (zero) interval? It took me an unreasonable amount of time trying to figure out the reason for the burning, the fact that QCocoaMenu::timerEvent() could be being called as fast as possible and for nothing occurred to me only after trying all other possibilities. And I knew only the timer change could be the culprit; I can only imagine how much more time I'd have spent if this bug had been latent for a few months. BTW, the 1st application in which I noticed this doesn't use the native menubar at all. I'm going to have to try and understand what business it has using QCocoaMenu... R. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
