summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml
blob: 881eccb16a264a69e5fa97a819147564c29c985b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QtQuick 1.0
import Qt.test 1.0

Item {
    id: arbitraryVariantConsumer
    property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider }
    property int sideEffect: 10

    function callCppFunction() {
        // in this case, we call a nonconst CPP function with no return value and an integer argument.
        arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 2;
        arbitraryVariantProvider.setVariantChangeCount(arbitraryVariantConsumer.sideEffect);
    }
}