aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmldom/domdata/domitem/ifStatements.qml
blob: 90d1bd3ac8e7be5ef816fa7517095f5c6760be1b (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
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQml

QtObject {
    function conditional() {
        let i = 5
        if (i)
            i = 42

        if (i == 55)
            i = 32
        else
            i = i - 1

        if (i == 42) {
            i = 111
        }

        if (i == 746) {
            i = 123
        } else {
            i = 456
        }
    }
}