Qt-FullyQualifiedMocTypes¶
Warns when a signal, slot, or invokable declaration is not using fully-qualified type names
Required inputs: IR
Also warns if a Q_PROPERTY of type gadget is not
fully-qualified (Enums and QObjects in Q_PROPERTY do not need
to be fully qualified).
Example:
namespace MyNameSpace {
struct MyType { (...) };
class MyObject : public QObject
{
Q_OBJECT
Q_PROPERTY(MyGadget myprop READ myprop); // Wrong, needs namespace
Q_SIGNALS:
void mySignal(MyType); // Wrong
void mySignal(MyNameSpace::MyType); // OK
};
}
Beware that fixing these type names might break user code if they are connecting to them via old-style connects, since the users might have worked around your bug and not included the namespace in their connect statement.
This rule is only relevant for moc input files.
This rule is based on clazy rule fully-qualified-moc-types
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
fully_qualify_property |
Q_PROPERTY of type {} should use full qualification ({}). |
None |
False |
not_fully_qualified |
{} need to be fully-qualified ({} instead of {}). |
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 = 0