Revision control

++ // Copyright (C) 2026 The Qt Company Ltd.
++ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
++
++ /*!
++ \ingroup qmllint-warnings-and-errors
++
++ \title Function used before its declaration
++ \brief [function-used-before-declaration] A function was used before its declaration.
++
++ \qmllintwarningcategory function-used-before-declaration
++
++ This category is disabled by default.
++
++ \section1 Function usage before its declaration
++
++ \section2 What happened?
++ You called a function or used its name before the function was declared.
++
++ \section2 Why is that bad?
++ It makes the code more difficult to read and may cause confusion.
++
++ Note that the function is made available before its declaration due to
++
++ \section2 Example
++ \qml
++ import QtQuick
++
++ Item {
++ function f() {
++ g(42)
++ function g() { return 42; }
++ }
++ }
++ \endqml
++
++ To fix this warning, move the declaration before the usage.
++
++ \qml
++ import QtQuick
++
++ Item {
++ function f() {
++ function g() { return 42; }
++ g(42)
++ }
++ }
++ \endqml
++ */