aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/indirectlyShadowable.qml
blob: de31527e5b8c6f955ed5e008f06151bde1b8cf18 (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
34
35
36
37
38
39
import QtQml

QtObject {
    id: self
    objectName: "self"

    component Inner : QtObject {
        property QtObject shadowable: QtObject {
            objectName: "shadowable"
        }
    }

    component Outer : QtObject {
        property Inner inner: Inner {}
    }

    component Evil : Outer {
        property string inner: "evil"
    }

    property Outer outer: Outer {}
    property Outer evil: Evil {}

    property QtObject notShadowable: QtObject {
        objectName: "notShadowable"
    }

    function getInnerShadowable() {
        notShadowable = outer.inner.shadowable;
    }

    function setInnerShadowable() {
        outer.inner.shadowable = self;
    }

    function turnEvil() {
        outer = evil;
    }
}