Lars
Lars

Reputation: 1466

Checking all Qt signal/slot connection

we done a lot of namespace refactoring. One big problems for us is now, that we only can check at runtime, if we have wrong signal/slot connections.

Is there a external tool, code analyser or a method, which we can check all signal/slot connection at once?

We think about froglogic squish, but we are not quite sure, if squish can help us in this detailed testing.

Thanks in advance, Lars

Upvotes: 7

Views: 1655

Answers (2)

Elmar de Koning
Elmar de Koning

Reputation: 519

Conan (sourceforge.net/projects/conanforqt/) will not help you with your problem as it can only examine and monitor existing connections at run-time.

As far as I know there is no tool that can check during compile time if all connection definitions are valid. Note that this is probably not even feasible, as connections can be dynamically constructed from local variables, input arguments, etc.

The only option I see is to find all places where connections are made. For each connection, check for any obvious problems: const correct, argument types not names, etc. Place a breakpoint and start debugging. Any incorrect connection will be logged to the console output / std:err by Qt.

Good luck

p.s.: you mentioned

Also have problems with model dialogues

Does this apply to Conan? If so can you provide me with details so I can update Conan?

Upvotes: 0

Pie_Jesu
Pie_Jesu

Reputation: 1914

There is a thing, that might be useful for you: Conan 1.0.0:. It works only on qt 4.6 and 4.7. See topic @qtCentre

Also I can recommend you Visual Assist X addIn tool for MSVStudio 200x and 2010 from http://www.wholetomato.com/, which has MANY solutions for refactoring. E.g.: renaming tool:


alt text


If you set checkbox "Comments and Strings" it will also rename this symbol everywhere in your code, in whole solution. So if you had correct connections and just refactoring namespaces and classes, this tool can help you. I hope so.

Upvotes: 1

Related Questions