summaryrefslogtreecommitdiff
path: root/kde-frameworks/kio/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-01-12 16:58:08 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-01-12 16:58:08 +0000
commitc8a77dfe4d3d307c1d5dd2650b7297447d8b609d (patch)
tree9ea78393bc3ecd6ab4de449383d4e97e5f3648ae /kde-frameworks/kio/files
parent2891d29af8907ce881662f4a02844926d7a293c7 (diff)
gentoo resync : 12.01.2019
Diffstat (limited to 'kde-frameworks/kio/files')
-rw-r--r--kde-frameworks/kio/files/kio-5.54.0-elapsedtime.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.54.0-elapsedtime.patch b/kde-frameworks/kio/files/kio-5.54.0-elapsedtime.patch
new file mode 100644
index 000000000000..d18347fb63d4
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.54.0-elapsedtime.patch
@@ -0,0 +1,38 @@
+From cd2f67c39b25de026390bfe2bc1c7aa269f78ccb Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Thu, 10 Jan 2019 16:03:06 +0000
+Subject: Fix elapsed time check
+
+Summary:
+To match the code it was refactored from it should be checking the code
+since the last time we checked calcSpeed, not since the job started.
+
+CCBUG: 402665
+
+Subscribers: kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D18158
+---
+ src/core/slaveinterface.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/slaveinterface.cpp b/src/core/slaveinterface.cpp
+index 6eb2b08..d79b498 100644
+--- a/src/core/slaveinterface.cpp
++++ b/src/core/slaveinterface.cpp
+@@ -103,7 +103,9 @@ void SlaveInterface::calcSpeed()
+ // using first and last item from the list.
+
+ const qint64 elapsed_time = d->elapsed_timer.elapsed();
+- if (elapsed_time >= 900) {
++ const qint64 last_time = d->transfer_details.isEmpty() ? 0 : d->transfer_details.last().time;
++
++ if (elapsed_time - last_time >= 900) {
+ if (d->transfer_details.count() == max_count) {
+ d->transfer_details.removeFirst();
+ }
+--
+cgit v1.1
+