Qt-PostEvent

Finds places where an event is not correctly passed to QCoreApplication::postEvent()

Required inputs: IR

QCoreApplication::postEvent() expects a heap allocated event, not a stack allocated one; whereas QCoreApplication::sendEvent() expects a stack allocated event, not a heap allocated one. The latter may produce false-positives.

This rule is based on clazy rule post-event

Possible Messages

Key

Text

Severity

Disabled

post_event

Events passed to postEvent should be heap allocated.

None

False

send_event

Events passed to sendEvent should be stack allocated.

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.