Qt-IncorrectEmit¶
The emit (or Q_EMIT) macro shall be used iff emitting a signal
Required inputs: IR
The emit (or Q_EMIT) shall be used if and only if a signal is emitted.
This rule will warn if you forget to use emit or if you use them on a non-signal.
Additionally, it will warn when emitting a signal from a constructor, because there's likely nothing connected to the signal yet (it could happen though, if the constructor itself, or something called by it, connects to that signal).
This rule is based on clazy rule incorrect-emit
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
emit_in_constructor |
Emitting inside constructor probably has no effect |
None |
False |
emit_non_signal |
Emit macro being used with non-signal {} |
None |
False |
emit_signal_without_macro |
Missing emit macro on signal call {} |
None |
False |
no_macros |
Qt macros are missing in Qt system include files. Either include Qt via user files or disable the advanced toolchain option “no_macro_invocations_for_system_headers”. |
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