Fix warnings: moc file "*.moc", but does not contain a Q_OBJECT or Q_GADGET macro
Closed, ResolvedPublic

Description

Fix warnings such as

AutoMoc: Warning: "/home/jarek/dev/src/kreport/src/items/label/KReportLabelPlugin.cpp"
The file includes the moc file "KReportLabelPlugin.moc", but does not contain a Q_OBJECT or Q_GADGET macro.

Tried to add this to cmake/modules/KReportMacros.cmake

set(CMAKE_AUTOMOC_DEPEND_FILTERS
  "KREPORT_PLUGIN_FACTORY" "[\n][ \t]*KREPORT_PLUGIN_FACTORY\\(.*"
)

based on https://gitlab.kitware.com/cmake/cmake/issues/17176 and https://cmake.org/cmake/help/v3.9/prop_tgt/AUTOMOC_DEPEND_FILTERS.html but the CMAKE_AUTOMOC_DEPEND_FILTERS feature is not yet released.

Applies to all projects that use K_PLUGIN_FACTORY_WITH_JSON i.e. KReport, KDb, Kexi.

staniek created this task.Sep 11 2017, 9:14 AM
staniek closed this task as Invalid.Mar 15 2023, 9:21 PM

Fixed already probably

staniek changed the task status from Invalid to Resolved.Mar 15 2023, 9:22 PM