[Qt-interest] Q_CLASSINFO macro expansion

Thomas Fjellstrom tfjellstrom at shaw.ca
Sun Jan 24 12:34:48 CET 2010


On Sun January 24 2010, Thiago Macieira wrote:
> Em Sábado 23. Janeiro 2010, às 21.49.57, z escreveu:
> > Hi all. Is there any way to make this work?
> > <code>
> > #define DBUS_INTERFACE "org.kde.test.dbserver"
> > Q_CLASSINFO("D-Bus Interface", DBUS_INTERFACE)
> > </code>
> 
> No.
> 

You could probably run the pre processor on the file before you run moc on 
it, with most of QTs macros set to insert the text that was there (which 
should expand that macro, but not expand Q_CLASSINFO).

But that would be horribly annoying, and error prone.

-- 
Thomas Fjellstrom
tfjellstrom at shaw.ca




More information about the Qt-interest-old mailing list