[Development] moc 4.8.6 & macros

Thiago Macieira thiago.macieira at intel.com
Thu Sep 11 21:49:48 CEST 2014


On Thursday 11 September 2014 21:44:15 Samuel Gaist wrote:
> What would be the correct procedure to handle QT_DEPRECATED_SINCE ? Removing
> it from around the signal declaration would make the code a bit
> inconsistent.
> 
> By the way, how is it handled in Qt 5 since building goes without any
> problem even with the macros around the signal ?

moc is smarter in Qt 5: it expands macros.

But the recommendation stands: do not #if (of any kind) anything that isn't 
#defined in the same source, in a header next to the one being compiled, or 
passed as -D in the command-line.

That means: don't hide signals and slots with #if, even for deprecation.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list