Priority: P2: Important
Affects Version/s: 6.x
Fix Version/s: None
Component/s: Build tools: moc
Maybe it's time to talk about supporting that features in Qt tools?
If I understand correctly, moc has to detect that "header" it scanned is actually a module interface unit (it has export module Foo;), and so it has to generate respective moc_Foo.cpp that will be one of the module implementation units, that:
- starts with module;,
- has all neccessarry-for-black-moc-magic includes in global module fragment,
- module Foo; to note that it's module implementation unit for that module Foo it found Q_OBJECT in earlier,
- Then all that moc-generated magic code (except for #include's as they can be only in global fragment?).
This issue does not imply that Qt has to ship it's code in C++20 modules, it's simply that moc support will allow users of Qt to use Qt classes within user-defined modules.