4
property bool success: false
6
function reportError(s) { console.warn(s) }
8
Component.onCompleted: {
10
if (!componentCache.isTypeLoaded('testVMEPropertyVMEComponent.1.qml')) return reportError('Test component not loaded')
11
if (componentCache.isTypeLoaded('VMEPropertyVMEComponent.qml')) return reportError('Property component already loaded')
12
if (componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component already loaded')
14
var comp = Qt.createComponent('VMEPropertyVMEComponent.qml')
16
if (!componentCache.isTypeLoaded('testVMEPropertyVMEComponent.1.qml')) return reportError('Test component not loaded 2')
17
if (!componentCache.isTypeLoaded('VMEPropertyVMEComponent.qml')) return reportError('Property component not loaded')
18
if (!componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component not loaded')
20
var obj = comp.createObject()
21
if (!obj) return reportError('Invalid object')
22
if (obj.foo != 'bar') return reportError('Invalid object 2')
23
if (obj.p == undefined) return reportError('Invalid object 3')
24
if (obj.p.foo != 'bar') return reportError('Invalid object 4')
28
if (!componentCache.isTypeLoaded('testVMEPropertyVMEComponent.1.qml')) return reportError('Test component not loaded 3')
29
if (!componentCache.isTypeLoaded('VMEPropertyVMEComponent.qml')) return reportError('Property component already unloaded')
30
if (!componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component already unloaded')
34
if (!componentCache.isTypeLoaded('testVMEPropertyVMEComponent.1.qml')) return reportError('Test component not loaded 4')
35
if (componentCache.isTypeLoaded('VMEPropertyVMEComponent.qml')) return reportError('Property component not unloaded')
36
if (componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component not unloaded')