Results 1 to 1 of 1

Thread: Debugging singal-slot connections

  1. #1
    Join Date
    Jul 2009
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Lightbulb Debugging singal-slot connections

    When working on a large Qt software project the amount of signal-slot connections can really go through the roof. During run-time I often want to know what is connected to what. I also regularly want to know how often and when a specific signal is emitted. In general I just want some proper signal-slot debugging.
    Unfortunately, Qt provides next to nothing for this. Sure you've got QObject::dumpObjectInfo, QObject::dumpObjectTree and the QSignalSpy, but their use is very limited and unpractical. So I decided to make my own signal-slot debugging library called Conan.

    Conan is a C++ library that provides run-time introspection of QObject hierarchies, QObject inheritance, signal/slot connections, and signal emissions. Through use of the conan::ConanWidget:
    -object hierarchies can be added/found and browsed
    -signals/slots, including active connections, can be examined
    -duplicate connections can be found
    -signal emissions can be monitored and logged
    Conan uses private Qt headers to extract all signal-slot information that exists.

    I usually add the ConanWidget to my debug build, so I can use it whenever I need to. It is real easy to use and has helped me locate multiple duplicate signal connection in Qt's own libraries. So if you ever need some signal-slot introspection, try Conan.

    Conan is GPL and can be downloaded from http://sourceforge.net/projects/conanforqt. There's a source package containing all sources, visual studio 2008 / qt creator / qmake project files, and extensive documentation. A demo application for Windows XP/Vista is also available, so you can play around with Conan and try it out first.

    I hope you find it usefull.

  2. The following user says thank you to gnik for this useful post:

    sky (5th January 2011)

Similar Threads

  1. Queued Signal Slot connections
    By SebastianBecker in forum Qt Programming
    Replies: 2
    Last Post: 24th June 2009, 21:06
  2. slot won´t be called (d3lphin debugging)
    By sirwitti in forum Qt Programming
    Replies: 7
    Last Post: 30th June 2008, 00:58
  3. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 20:56
  4. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 17:21

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.