Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / scarceResourceSignal.var.qml
1 import QtQuick 2.0
2 import Qt.test 1.0
3
4 QtObject {
5     id: root
6
7     property MyScarceResourceObject a;
8     a: MyScarceResourceObject { id: scarceResourceProvider }
9
10     property ScarceResourceSignalComponentVar b;
11     b: ScarceResourceSignalComponentVar {
12         objectName: "srsc"
13
14         onTestSignal: {
15             // this signal will be invoked manually in the test.
16             // the scarce resource should be released automatically after evaluation
17             // and since we don't keep a copy of it, the pixmap will be detached.
18             width = (scarceResourceProvider.scarceResource,10)
19         }
20
21         onTestSignal2: {
22             // this signal will be invoked manually in the test.
23             // the scarce resource should be released automatically after evaluation
24             // but since we assign it to a property, the pixmap won't be detached.
25             scarceResourceCopy = scarceResourceProvider.scarceResource
26         }
27     }
28 }
29