on xenial help sign in
Scopes guys want the data back
3f4295cAlbert Astals
qml/Dash/Previews/PreviewActionButton.qml+2−2
@@ -18,7 +18,7 @@ import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19
19
20Button {
20Button {
21− signal triggeredAction(string id)
21+ signal triggeredAction(var actionData)
22
22
23 property var data: null
23 property var data: null
24 objectName: "button" + (data && data.id || "")
24 objectName: "button" + (data && data.id || "")
@@ -26,5 +26,5 @@ Button {
26 text: data && data.label || ""
26 text: data && data.label || ""
27 iconSource: data && data.icon || ""
27 iconSource: data && data.icon || ""
28 iconPosition: "left"
28 iconPosition: "left"
29− onClicked: triggeredAction(data.id)
29+ onClicked: triggeredAction(data)
30}
30}
qml/Dash/Previews/PreviewActionCombo.qml+2−2
@@ -22,7 +22,7 @@ Item {
22
22
23 implicitHeight: childrenRect.height
23 implicitHeight: childrenRect.height
24
24
25− signal triggeredAction(string id)
25+ signal triggeredAction(var actionData)
26
26
27 property alias model: actionRepeater.model
27 property alias model: actionRepeater.model
28
28
@@ -59,7 +59,7 @@ Item {
59 delegate: PreviewActionButton {
59 delegate: PreviewActionButton {
60 data: modelData
60 data: modelData
61 width: implicitWidth < parent.width ? parent.width : implicitWidth
61 width: implicitWidth < parent.width ? parent.width : implicitWidth
62− onClicked: root.triggeredAction(modelData.id)
62+ onClicked: root.triggeredAction(modelData)
63 }
63 }
64 }
64 }
65 }
65 }
qml/Dash/Previews/PreviewActions.qml+2−2
@@ -49,7 +49,7 @@ PreviewWidget {
49 Connections {
49 Connections {
50 target: loader.item
50 target: loader.item
51 onTriggeredAction: {
51 onTriggeredAction: {
52− root.triggered(root.widgetId, id, null);
52+ root.triggered(root.widgetId, actionData.id, actionData);
53 }
53 }
54 }
54 }
55 }
55 }
@@ -57,7 +57,7 @@ PreviewWidget {
57 PreviewActionButton {
57 PreviewActionButton {
58 data: visible ? row.actions[0] : null
58 data: visible ? row.actions[0] : null
59 visible: row.actions && row.actions.length > 0
59 visible: row.actions && row.actions.length > 0
60− onTriggeredAction: root.triggered(root.widgetId, id, null)
60+ onTriggeredAction: root.triggered(root.widgetId, actionData.id, actionData)
61 width: (root.width - units.gu(1)) / 2
61 width: (root.width - units.gu(1)) / 2
62 }
62 }
63 }
63 }