Bug 362063

Summary: [qobject-macro] False positive when implementing qt_metacall manually
Product: [Developer tools] clazy Reporter: Volker Krause <vkrause>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Volker Krause 2016-04-22 07:17:42 UTC
If you implement the virtuals defined by Q_OBJECT yourself, bypassing moc, the missing Q_OBJECT warning still triggers. It's a very rare fringe case, of course ;)

Reproducible: Always

Steps to Reproduce:
An example can be found e.g. in GammaRay, core/multisignalmapper.cpp, GammaRay::MultiSignalMapperPrivate. The most prominent example for this in Qt is QSignalSpy, which is excluded from this check already by being a template though.
Comment 1 Sergio Martins 2016-04-24 17:11:00 UTC
Sounds like a good candidate for testing suppressions:

Can you add to the file where the warning was reported:

// clazy:excludeall=missing-qobject
Comment 2 Sergio Martins 2016-06-09 18:38:29 UTC
Closing this as fixed, although // clazy:excludeall=missing-qobject is not an elegant solution implementing a better solution would be a lot of work for such edge case