on xenial help sign in
make sure the Placeholder is created
e82ae4eLukáš Tinkl
tests/qmltests/Notifications/tst_Notifications.qml+15−15
@@ -31,26 +31,26 @@ Item {
31 height: notificationsRect.height
31 height: notificationsRect.height
32 property int index: 0
32 property int index: 0
33
33
34+ // add the default/PlaceHolder notification to the model
35+ Component.onCompleted: {
36+ var component = Qt.createComponent("Notification.qml")
37+ var n = component.createObject("notification", {"nid": index++,
38+ "type": Notification.PlaceHolder,
39+ "hints": {},
40+ "summary": "",
41+ "body": "",
42+ "icon": "",
43+ "secondaryIcon": "",
44+ "rawActions": []})
45+ n.completed.connect(mockModel.onCompleted)
46+ mockModel.append(n)
47+ }
48+
34 Row {
49 Row {
35 id: rootRow
50 id: rootRow
36
51
37 NotificationModel {
52 NotificationModel {
38 id: mockModel
53 id: mockModel
39−
40− // add the default/PlaceHolder notification to the model
41− Component.onCompleted: {
42− var component = Qt.createComponent("Notification.qml")
43− var n = component.createObject("notification", {"nid": index++,
44− "type": Notification.PlaceHolder,
45− "hints": {},
46− "summary": "",
47− "body": "",
48− "icon": "",
49− "secondaryIcon": "",
50− "rawActions": []})
51− n.completed.connect(mockModel.onCompleted)
52− append(n)
53− }
54 }
54 }
55
55
56 function add2over1SnapDecisionNotification() {
56 function add2over1SnapDecisionNotification() {