summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/declarative/script/data/slot_complex_js.qml
blob: ed4f78b92ac01e73c2f1caece758f679b271ed48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Qt.test 1.0

TestObject {
    Script {
        function myCustomFunction(n) {
            var a = 1;
            while (n > 0) {
                a = a * n;
                n--; 
            }
            return a;
        }
    }

    onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } }
}