The situation for including moc files has changed a bit since then: What we currently do when generating files: - Add '#include "myclass.moc"' => Okay for automoc4 times There are now these possibilities, when using CMake automoc: - Don't add an include at all, let CMake figure out when to include the moc file in the TU - Add '#include "moc_myclass.cpp"' We somehow need to make this behavior configurable (or automagically work), since it's getting a bit annoying creating files from templates when CMake-Automoc is in place: You'll always have to edit the generated .cpp by hand and fixup the moc include. Proposal: We know due to our CMake manager, when CMake-Automoc is in place. Make the template generator aware of that. Also see: http://mail.kde.org/pipermail/kde-buildsystem/2011-November/008287.html (sheds some light on all that automoc stuff) Reproducible: Always
With https://phabricator.kde.org/D3657 we no longer add the line at all => Issue fixed.