aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/reformatter/comments.qml
blob: d2caa1b555ef8b0e734be2751b6dc62958bf22a7 (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
import QtQuick 2.0

/* Comment 1
   This is a multiline comment. */

/*
 Another multiline comment.

 A slightly different formatting.
*/
Item {
    /*
      Indented multiline comment.
      */

    // Comment over a signal.
    signal foo

    function test() {
        for (var i = model.count - 1; i >= 0; --i) // in-line comment
        {
            console.log("test")
        }

        var a = 1
        if (a > 0) {
            console.log("positive")
        } // Final condition
        else {
            console.log("negative or zero")
        }
    }
}