Hi,

Il 06/12/19 10:48, Dmitriy Purgin ha scritto:
Hi Giuseppe,

 > This trick is used in several places in Qt itself (look for "includemoc"
 > in commits). Not only it helps build times but also it produces slightly
 > better code overall.

Could you please elaborate what exactly do you mean under 'better code'? How does including the xxx_moc.cpp affect the code generation by moc? If moc decides to generate a better code when included explicitly in a cpp file, why can't it generate the same better code otherwise? Is there a technical reason for it?


Sorry, not the code generated by moc -- the code generated by the compiler/linker. See e.g. here:

https://codereview.qt-project.org/c/qt/qtbase/+/152423

HTH,

--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | 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: Firma crittografica S/MIME

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to