Just test it and
#define BEGIN_SIGNALS signals:
really works as expected since moc also does preprocessing.
The compilation order for the class QObject MyQObjectis -
start moc for MyQObject.h
moc run the C preprocessor
moc produces the moc_MyObject.cpp file
moc_MyObject.cpp is compiled by the native compiler
MyQObject.cpp compiled using your own compiler before or after.
Remember that the word itself signalsis a macro that converts to protectedwhen its own compiler is used. so I'm not sure why you ever want to define something like thisBEGIN_SIGNALS
source
share