[Qt-interest] declare signals and slots in macros

Nathan Carter nathancarter5 at gmail.com
Fri Mar 13 01:54:32 CET 2009


Yes, it is also my understanding (as another poster stated) that slots  
expands to nothing and is just a meta-compiler hint AND a useful flag  
for the reader.  So I don't think that the transformation you describe  
below should "make a lot of things go wrong."  Is it possible it's  
something else?

Nathan


On Mar 12, 2009, at 6:32 PM, Andrea Franceschini wrote:

> Hi all,
> As you may have guessed, I am the one that always comes out with
> naughty code :) This time I tried to define a macro which dealt with
> the declaration of slots. Obviously macro expansion is not recursive,
> so basically when I put in my macro
>
> public slots:
>
> it is expanded as
>
> public :
>
> which makes a lot of things go wrong. So, as far as you know, is there
> a better way to achieve this? I so badly need to do that but of course
> the rules of the games are these. Ideas?
>
> -- 
> Andrea
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list