Qt-ChildEventQObjectCast

Finds places within child events where qobject_cast can fail

Required inputs: IR

Finds places where qobject_cast(event->child()) is being used inside QObject::childEvent() or equivalent (QObject::event() or QObject::eventFilter()) that can fail because the child might not be totally constructed yet.

This rule is based on clazy rule child-event-qobject-cast

Possible Messages

Key

Text

Severity

Disabled

qobject_cast_in_child_event

QObject cast in child event.

None

False

Options

level

level : int = 1

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