05-01-2013 12:31 AM
I am using a QTimer with the special case of start(0) which is supposed to call the timer callback whenever the event queue is empty. This timer runs constantly (i.e. I start it and don't stop it until shutdown). My application runs fine for quite a while but then sometimes this timer stops getting called. The application continues to run and the UI is responsive but this timer no longer fires (I set a breakpoint in the timer routine and the logging verifies this).
QTimer GuiTaskQueue::s_timer; // static timer for our class
GuiTaskQueue::GuiTaskQueue() : super(NULL)
connect(&s_timer, SIGNAL(timeout()), this, SLOT(onTimer()));
s_timer.start(0); // special case, we get called whenever the event queue is empty