File 0001-Revert-Show-correct-current-download-and-upload-spee.patch of Package plasma-nm5
From 0429d11739927bfbe9bb7c7ec1fb34c64aeb22f8 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 23 Oct 2018 16:28:16 +0200
Subject: [PATCH] Revert "Show correct current download and upload speed"
This reverts commit c5593b02df3864fe7a720925492306734d0b94e6.
---
applet/contents/ui/ConnectionItem.qml | 26 ++------------------------
libs/models/networkmodel.cpp | 6 ------
2 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/applet/contents/ui/ConnectionItem.qml b/applet/contents/ui/ConnectionItem.qml
index cb3c582b..3e5af365 100644
--- a/applet/contents/ui/ConnectionItem.qml
+++ b/applet/contents/ui/ConnectionItem.qml
@@ -43,9 +43,6 @@ PlasmaComponents.ListItem {
property bool visibleDetails: false
property bool visiblePasswordDialog: false
- property real rxBytes: 0
- property real txBytes: 0
-
checked: connectionItem.containsMouse
enabled: true
height: expanded ? baseHeight + separator.height + expandableComponentLoader.height + (2 * Math.round(units.gridUnit / 3)) : baseHeight
@@ -235,25 +232,6 @@ PlasmaComponents.ListItem {
}
}
- Timer {
- id: timer
- repeat: true
- interval: 2000
- running: showSpeed
- property real prevRxBytes
- property real prevTxBytes
- Component.onCompleted: {
- prevRxBytes = RxBytes
- prevTxBytes = TxBytes
- }
- onTriggered: {
- rxBytes = (RxBytes - prevRxBytes) * 1000 / interval
- txBytes = (TxBytes - prevTxBytes) * 1000 / interval
- prevRxBytes = RxBytes
- prevTxBytes = TxBytes
- }
- }
-
states: [
State {
name: "collapsed"
@@ -333,9 +311,9 @@ PlasmaComponents.ListItem {
return i18n("Connected, <font color='%1'>⬇</font> %2/s, <font color='%3'>⬆</font> %4/s",
downloadColor,
- KCoreAddons.Format.formatByteSize(rxBytes),
+ KCoreAddons.Format.formatByteSize(RxBytes),
uploadColor,
- KCoreAddons.Format.formatByteSize(txBytes))
+ KCoreAddons.Format.formatByteSize(TxBytes))
} else {
return i18n("Connected")
}
diff --git a/libs/models/networkmodel.cpp b/libs/models/networkmodel.cpp
index d6215d73..e4b0f73e 100644
--- a/libs/models/networkmodel.cpp
+++ b/libs/models/networkmodel.cpp
@@ -300,12 +300,6 @@ void NetworkModel::addActiveConnection(const NetworkManager::ActiveConnection::P
}
item->invalidateDetails();
qCDebug(PLASMA_NM) << "Item " << item->name() << ": active connection state changed to " << item->connectionState();
-
- if (device && device->uni() == item->devicePath()) {
- auto deviceStatistics = device->deviceStatistics();
- item->setRxBytes(deviceStatistics->rxBytes());
- item->setTxBytes(deviceStatistics->txBytes());
- }
}
}
endResetModel();
--
2.19.0