[Digikam-devel] Re: enum as parameter in QSignal not working?

Marcel Wiesweg marcel.wiesweg at gmx.de
Thu Oct 21 11:16:44 BST 2010


> It's pretty funny that QObject::connect compares the two objects literally,
> but anyway, it's good to know for the future!

Yes. The SIGNAL / SLOT macros convert its parameter to a string constant, 
QObject::connect takes const char*.
The string is then parsed by QMetaObject::normalizedSignature, removing spaces 
etc.
The great advantage of this approach is that it works with DBus, QtScript, QML 
etc. The disadvantage is that connect arguments are not checked by the 
compiler - I manage again and again to include parameter names in connect.

Marcel



More information about the Digikam-devel mailing list