Shadow
This warning category is spelled [shadow] by qmllint.
Signal or method already exists in base type
What happened?
A member in the current component has the same name as a signal or method from a base class.
Note that properties shadowing other properties are handled by the Property override category.
Why is that bad?
The shadowed signal or method can't be used anymore. It makes the code more difficult to read and may cause confusion.
Example
import QtQuick
Item {
component Base: Item { signal f(); }
Base {
property int f: 42
}
}
To fix this warning, rename the signal f or the shadowing int property.
import QtQuick
Item {
component Base: Item { signal f(); }
Base {
property int notF: 42
}
}