aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/noCaptureWhenWritingProperty.qml
blob: 8b8601692dc2dce1015561b9f8d632118e5b36e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QtQml 2.0
QtObject {
    property bool somePropertyEvaluated: false;

    property int someProperty: {
        // It's sort of evil to set the property here, but that doesn't mean that
        // this expression should get re-evaluated when unrelatedProperty changes later.
        somePropertyEvaluated = true
        return 20;
    }
    Component.onCompleted: {
        somePropertyEvaluated = false
    }
}