Qt-InstallEventFilter¶
Warns on potential misuse of QObject::installEventFilter()
Required inputs: IR
QObject::installEventFilter().
To install an event filter you should call
monitoredObject->installEventFilter(this), but sometimes you'll write
installEventFilter(filterObject) by mistake, which compiles fine.
In rare cases you might actually want to install the event filter on this, in which case this is a false-positive.
This rule is based on clazy rule install-event-filter
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
install_filter |
“this” should usually be the filter object, not the monitored one. |
None |
False |
missing_event_filter |
The class of “this” should override QObject::eventFilter. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
level¶
level : int = 1