Both advantages and disadvantages will come from the fact that MOC won't
generate anything for methods in these sections.

Pros:
1) less code and data -> smaller executable;
2) less code -> faster compilation;
3) smaller "MOC table" -> faster lookups when connecting and/or
processing signals.

Cons:
1) no runtime information about signals and slots -> no way to
[semi]automagically make them available to non-C++ parts of the
application (scripts, etc.) or anything else that can't be "configured"
at compile-time.

I'd say the change is mostly cosmetic since the benefits are negligible
and the only disadvantage I can think of is not critical for some/most
applications.

On 03/08/2015 01:58 PM, Guido Seifert wrote:
> Hi,
> I am just curious. In one of my old projects I replaced all SIGNAL/SLOT 
> connections with the newer function pointer api.
> In theory I now could remove all the 'public/protected/private slot' markers 
> from my .h files. Now I am wondering, if this
> is only cosmetic, or does it have any advantages/disadvantages? Faster 
> compile time? Smaller executables? 
> 
> Guido

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to