[Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?
Thiago Macieira
thiago.macieira at intel.com
Wed Aug 30 17:35:10 CEST 2017
On Wednesday, 30 August 2017 00:30:05 PDT Olivier Goffart wrote:
> We can change the documentation and recommend against using killTimer and
> startTimer. QBasicTimer should be used instead. This would have probably
> avoided the problem in this case (as one would have called stop instead of
> m_updateTimer = 0). And in general is easier to use for 0 overhead.
Actually, there is an overhead, albeit very small one: the timer ID is stored.
Your class may not need the timer ID. It can stop the timer by using
QTimerEvent::timerId() when the timer fires.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list