[applets/devicenotifier] Simplify adding the default contextual action

(cherry picked from commit a0965f3954)
wilder-5.25
ivan tkachenko 4 years ago
parent 19cf628a93
commit 5486002c58
  1. 8
      applets/devicenotifier/package/contents/ui/DeviceItem.qml

@ -262,9 +262,7 @@ PlasmaExtras.ExpandableListItem {
}
// "Mount" action that does not open it in the file manager
QQC2.Action {
id: mountWithoutOpeningAction
contextualActionsModel: QQC2.Action {
text: i18n("Mount")
icon.name: "media-mount"
@ -277,8 +275,4 @@ PlasmaExtras.ExpandableListItem {
service.startOperationCall(operation);
}
}
Component.onCompleted: {
contextualActionsModel.push(mountWithoutOpeningAction);
}
}

Loading…
Cancel
Save