[Qt-interest] why index for signal/slots?

Arnold Krille arnold at arnoldarts.de
Tue May 26 10:51:40 CEST 2009


On Monday 25 May 2009 07:43:25 Luca Ferrari wrote:
> is there any technical reason for using numeric indexes to dispatch among
> signal/slots instead of using function pointers? I mean, in the moc
> generated code (qt_metacall function).

Probably for speed reasons. Comparing strings is much slower then comparing 
ints...

And maybe also or memory-footprint reasons. And don't tell me that everyone 
today has enough memory but think about mobile / embedded devices.

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090526/bbdefc33/attachment.bin 


More information about the Qt-interest-old mailing list