4
property bool success: false
6
function reportError(s) { console.warn(s) }
8
Component.onCompleted: {
10
if (!componentCache.isTypeLoaded('testVMEAggregateVMEComponent.1.qml')) return reportError('Test component not loaded')
11
if (componentCache.isTypeLoaded('VMEExtendVMEComponent.qml')) return reportError('Aggregate component already loaded')
12
if (componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component already loaded')
14
var comp = Qt.createComponent('VMEAggregateVMEComponent.qml')
16
if (!componentCache.isTypeLoaded('testVMEAggregateVMEComponent.1.qml')) return reportError('Test component not loaded 2')
17
if (!componentCache.isTypeLoaded('VMEAggregateVMEComponent.qml')) return reportError('Aggregate 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.children[0].foo != 'bar') return reportError('Invalid object 3')
27
if (!componentCache.isTypeLoaded('testVMEAggregateVMEComponent.1.qml')) return reportError('Test component not loaded 3')
28
if (!componentCache.isTypeLoaded('VMEAggregateVMEComponent.qml')) return reportError('Aggregate component already unloaded')
29
if (!componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component already unloaded')
33
if (!componentCache.isTypeLoaded('testVMEAggregateVMEComponent.1.qml')) return reportError('Test component not loaded 4')
34
if (componentCache.isTypeLoaded('VMEAggregateVMEComponent.qml')) return reportError('Aggregate component not unloaded')
35
if (componentCache.isTypeLoaded('VMEComponent.qml')) return reportError('VME component not unloaded')