[Interest] Debugging not emitted signals
André Somers
andre at familiesomers.nl
Fri Jul 31 10:58:28 CEST 2015
Op 31-7-2015 om 10:51 schreef Nuno Santos:
> Hi,
>
> I’m facing a weird issue. I have signal in a class that is not being emitted.
How do you know this? My guess is: all you know is that your slots that
you think you connected to this signal are not getting called, but that
is not the same thing.
>
> What can be causing this? How should I debug?
Put a breakpoint at the emit line, and follow what happens from there.
>
> I have tripple checked everything and can’t figure it out, why such a basic functionality is not working.
You can be sure that the basic functionality _is_ working. In fact, it
is a safe assumption to make when you start debugging anything: the
error is in the code you wrote, and not in the libraries you are using.
Only occasionaly, you'll find that the bug actualy _is_ in the library,
but that will be the exception and not the rule, especially if it is
about basic, tried-and-tested functionality of that library like the
signal-slot system in Qt.
> Can someone provide me some debugging tips for this case?
Use the new style of connect (compile time checking) and again: use your
debugger.
André
More information about the Interest
mailing list