1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qmllint-warnings-and-errors-with.html
6\ingroup qmllint-warnings-and-errors
9\brief With statements are strongly discouraged in QML.
11\section1 With Statements
13\section2 What happened?
14The JavaScript \c{with} statement was used.
16\section2 Why is this bad?
17With statements might cause false positives when analysing unqualified identifiers. Also, \c{with}
19\l{https://262.ecma-international.org/#sec-with-statement}{marked as deprecated by the latest JavaScript standard}.
33You can fix this warning by replacing the \c{with} statement with a destructuring property,
47\note You can find more replacement ideas
48\l{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with?retiredLocale=de#examples}{here}.