[Interest] Additional output from QtCore

Thiago Macieira thiago.macieira at intel.com
Thu Feb 5 20:35:38 CET 2015


On Thursday 05 February 2015 16:22:40 Valery Kotov wrote:
> Greetings everybody!
> 
> I'm looking for a piece of advice. Let me describe the problem. We have
> QTimer which emits a signal each N seconds. The timer has queued connection
> between "timeout" signal and sltTimeout slot. The slot has some output (to
> identify if the signal was emitted).

Why is it queued? You're adding a delay of one full event loop processing 
after the timer fires, which already happens inside the event loop.

> For some time we have everything working perfectly fine: timer emit signal
> each N seconds and sltTimeout printouts appeared each N seconds. At some
> moment in time we stop receiving them, but other traces from the process
> are available. Unfortunately, as far as connection is queued we can't
> really say if the signal was emitted but was not handled.
> Is there any way to get any additional information from QtQore about it's
> internal message queue? I think it could give us some intuition why we
> missed QTimer event. Could you point at some modules or classes in qtbase
> which can give me an impression about what is going on inside qt?
> I would really appreciate any advises from your side.

You can do that if you write a testcase. With QtTest, you can use the -vs 
option to print all signal emissions.

Another option is to just put a breakpoint and debug inside QtCore.

In any case, verify whether the timer is still alive. And drop the queue, 
since it's not really necessary...

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list