Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. diff --git a/kcm/package/contents/ui/ConnectionsView.qml b/kcm/package/contents/ui/ConnectionsView.qml
  2. index 0beae4b..53f0a8f 100644
  3. --- a/kcm/package/contents/ui/ConnectionsView.qml
  4. +++ b/kcm/package/contents/ui/ConnectionsView.qml
  5. @@ -22,19 +22,26 @@ import QtQuick 2.12
  6. import QtQuick.Layouts 1.3
  7. import QtQuick.Controls 2.12 as QQC2
  8. import org.kde.kcm 1.2 as KCM
  9. +import org.kcm.firewall 1.0
  10.  
  11. -import org.kde.kirigami 2.4 as Kirigami
  12. +import org.kde.kirigami 2.10 as Kirigami
  13.  
  14. /* TODO: Move this to a Table View */
  15. KCM.ScrollViewKCM {
  16. id: root
  17. signal filterConnection(var protocol, var localAddress, var foreignAddres, var status)
  18.  
  19. + title: i18n("Connections")
  20. + property NetstatClient netStatClient
  21. + property QtObject drawer
  22. +
  23. + Component.onCompleted: print("AAAA"+netStatClient)
  24. view: ListView {
  25. clip: true
  26. - model: netStatClient.connections()
  27. + model: netStatClient ? netStatClient.connections() : null
  28. delegate: ConnectionItemDelegate {
  29. onFilterConnection: root.filterConnection(protocol, localAddress, foreignAddres, status)
  30. + onClicked: root.drawer.open()
  31. }
  32.  
  33. headerPositioning: ListView.OverlayHeader
  34. diff --git a/kcm/package/contents/ui/main.qml b/kcm/package/contents/ui/main.qml
  35. index a81b3e9..8f83b15 100644
  36. --- a/kcm/package/contents/ui/main.qml
  37. +++ b/kcm/package/contents/ui/main.qml
  38. @@ -124,7 +124,7 @@ KCM.ScrollViewKCM {
  39. footer: RowLayout {
  40. QQC2.Button {
  41. text: i18n("Connections...")
  42. - onClicked: kcm.push("ConnectionsView.qml");
  43. + onClicked: kcm.push("ConnectionsView.qml", {"netStatClient": netStatClient, "drawer": drawer});
  44. }
  45. QQC2.Button {
  46. text: i18n("Logs...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement