Enum entry matches enum¶
[enum-entry-matches-enum] Enum entry should be named differently than the enum itself.
This warning category is spelled [enum-entry-matches-enum] by qmllint.
Enum entry should be named differently than the enum itself¶
What happened?¶
An enum has the same name as one of its entries.
Why is that bad?¶
There can be ambiguity as to what a lookup resolves to, see example below.
Example¶
To fix this warning, resolve the name clash by renaming either the enum or the enum entry: