aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml/script/data/slot_complex.qml
blob: fd1a2f1394e792af2f9bb9b71d558a1e343d66bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import Qt.test 1.0

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

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