开发者

Checking all Qt signal/slot connection

开发者 https://www.devze.com 2023-01-29 20:32 出处:网络
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.

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, wh开发者_StackOverflow中文版ich 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


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:


Checking all Qt signal/slot connection


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.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消