summaryrefslogtreecommitdiff
path: root/src/settingsdialognexus.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-08-26 03:01:55 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-08-26 03:01:55 -0400
commitc42e5fb2fec9b20fe6956d8798b85874b2eff73e (patch)
tree379ec7ae6407ce7d5adf98c5cb885ae17d7c53ec /src/settingsdialognexus.cpp
parent896d80d02ccef746ba6598534ce444da2755ae04 (diff)
changed total speed and count to a list of the last 5 downloads
existing servers now merged when retrieving the download links download manager doesn't store the servers any more, queries the settings every time
Diffstat (limited to 'src/settingsdialognexus.cpp')
-rw-r--r--src/settingsdialognexus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settingsdialognexus.cpp b/src/settingsdialognexus.cpp
index 926ea9a6..f2bd3ab5 100644
--- a/src/settingsdialognexus.cpp
+++ b/src/settingsdialognexus.cpp
@@ -87,9 +87,9 @@ NexusSettingsTab::NexusSettingsTab(Settings& s, SettingsDialog& d)
descriptor += QStringLiteral(" (automatic)");
}
- if (server.downloadSpeed() > 0 && server.downloadCount() > 0) {
- const int bps = static_cast<int>(server.downloadSpeed() / server.downloadCount());
- descriptor += QString(" (%1 kbps)").arg(bps / 1024);
+ const auto averageSpeed = server.averageSpeed();
+ if (averageSpeed > 0) {
+ descriptor += QString(" (%1 kbps)").arg(averageSpeed / 1024);
}
QListWidgetItem *newItem = new ServerItem<int>(descriptor, Qt::UserRole + 1);