On 5/28/20 8:21 PM, Matthew Woehlke wrote:
if a .cpp file has a #include "myclass.moc" type statement, that .cpp
file has to be processed by moc
Huh?*Why*?

A direct use case of this is to support having Q_OBJECT classes defined in a .cpp file. That requires moc to parse foo.cpp file and produce foo.moc.

The question is, does this happen unconditionally when a #include "foo.moc" appears a .cpp, even if that .cpp is not using Q_OBJECT & friends? Why would it be necessary in this case?

My 2 c,
--
Giuseppe D'Angelo | [email protected] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to