Is there a way to check for duplicate connection in Qt?

If a

connect(sender,signal,receiver,slot); 

      

called multiple times. When a signal is emitted, the slot will be called multiple times. I know UniqueConnection can be used to prevent this.

But is there a way to quickly check for a potential duplicate connection? Now I am looking at a project with thousands of lines of code.

+3


source to share


1 answer


You can use Conan , which is a connection parser for Qt. Using it you can see the hierarchy object, object inheritance, signal / slot connections, and signal ejections at runtime. He claims that:

Conan is used to identify multiple duplicate connections in the Qt source code!



Another option is to use GammaRay , which is an ideal tool for analyzing your Qt application in many aspects. Of course, it has the ability to view the properties of an object, signals, slots, and connections.

+1


source







All Articles