With¶
[with] With statements are strongly discouraged in QML.
This warning category is spelled [with] by qmllint.
With statements¶
What happened?¶
The JavaScript with statement was used.
Why is this bad?¶
With statements might cause false positives when analysing unqualified identifiers. Also, with statements are marked as deprecated by the latest JavaScript standard .
Example¶
To fix this warning, replace the with statement with a destructuring property:
Note
You can find more replacement ideas here .