On 28/05/2020 13.19, Adam Light wrote:
if a .cpp file has a #include "myclass.moc" type statement, that .cpp
file has to be processed by moc
Huh? *Why*?

AFAIK that's just... wrong.

MOC needs to process files that do metaobject things (e.g. use Q_OBJECT). Including a .moc in a .cpp does not affect whether that .cpp does metoobject things. Either you already needed to process it, or you don't, and adding a .moc include doesn't change that. (And your *build system* should be, without doing *any* sort of resolution of includes, processing your input files to determine whether or not to even *invoke* MOC at all.)

This sounds like a problem with your build setup.

--
Matthew
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to