diff --git a/mobile/wifi/package/contents/ui/ConnectionItemDelegate.qml b/mobile/wifi/package/contents/ui/ConnectionItemDelegate.qml --- a/mobile/wifi/package/contents/ui/ConnectionItemDelegate.qml +++ b/mobile/wifi/package/contents/ui/ConnectionItemDelegate.qml @@ -117,7 +117,7 @@ Kirigami.Action { iconName: "entry-delete" visible: (Uuid != "")? true : false - onTriggered: forgetNetwork() + onTriggered: handler.removeConnection(ConnectionPath) } ] @@ -149,10 +149,4 @@ connectionPasswordField.visible = true; } } - - function forgetNetwork() { - deleteConnectionDialog.name = ItemUniqueName - deleteConnectionDialog.dbusPath = ConnectionPath - deleteConnectionDialog.open() - } } diff --git a/mobile/wifi/package/contents/ui/main.qml b/mobile/wifi/package/contents/ui/main.qml --- a/mobile/wifi/package/contents/ui/main.qml +++ b/mobile/wifi/package/contents/ui/main.qml @@ -160,40 +160,4 @@ } } */ - Kirigami.OverlayDrawer { - id: deleteConnectionDialog - property var name - property var dbusPath - edge: Qt.BottomEdge - - contentItem: Column { - anchors.centerIn: parent - spacing: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing - - Controls.Label { - anchors.horizontalCenter: parent.horizontalCenter - text: i18n("Delete connection %1 from device?", deleteConnectionDialog.name) - } - Controls.Button { - text: i18n("Delete") - anchors.horizontalCenter: parent.horizontalCenter - onClicked: { - handler.removeConnection(deleteConnectionDialog.dbusPath) - deleteConnectionDialog.close() - } - } - Controls.Button { - text: i18n("Cancel") - anchors.horizontalCenter: parent.horizontalCenter - onClicked: deleteConnectionDialog.close() - } - } - onVisibleChanged: { - if (!visible) { - deleteConnectionDialog.name = "" - deleteConnectionDialog.dbusPath = "" - } - } - } }