Qt-BaseClassEvent

Warns when you return false inside your QObject::event() or QObject::eventFilter() reimplementation

Required inputs: IR

Warns when you return false inside your QObject::event() or QObject::eventFilter() reimplementation. Instead you should probably call the base class method, so the event is correctly handled.

This rule is based on clazy rule base-class-event

Possible Messages

Key

Text

Severity

Disabled

returns_false

Return {} instead of false.

None

False

Options

level

level : int = 2

Importance level of the rule as given for clazy. 0 is most desirable, higher values fall off in quality.
 

report_direct_qobject_event_filter_redefinition

report_direct_qobject_event_filter_redefinition : bool = False

Since eventFilter() of QObject or QWidget does nothing, a redefinition in a direct subclass is not reported. False is the default also for clazy.
 

report_qobject_event_filter_redefinitions

report_qobject_event_filter_redefinitions : bool = False

Since eventFilter() of QObject or QWidget does nothing, redefinitions are not reported. Set this to True to be consistent with clazy.