aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmlls/utils/data/highlights/identifiers.qml
blob: 7725b6d5e445bd15ce0be98101fe9b4bf00454f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick

Item {
    readonly property int test: 34
    signal pressed()
    function f() {
        let sum = 0, sum2 = 0
        for(let i = 1; i < 42; i = i + 2) {
            sum = test + i
            {
                let sum = 42; // another unrelated sum
            }
        }
        // signal and property changed
        testChanged();
        pressed();
    }

    // attached
    Keys.onPressed: {
    }

    // propertychanged handler
    onTestChanged: {
        f(); // method identifier
    }

    // signal handler
    onPressed: {}

    enum K { Plus}
    property int tt: Identifiers.Plus // component and enum value

}