Bug 362063 - [qobject-macro] False positive when implementing qt_metacall manually
Summary: [qobject-macro] False positive when implementing qt_metacall manually
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 07:17 UTC by Volker Krause
Modified: 2016-06-09 18:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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