From b8ca36372be11b9ddddb3daa3d32583d286f19e2 Mon Sep 17 00:00:00 2001 From: Janrupf Date: Sat, 3 Mar 2018 21:22:00 +0100 Subject: GH-2124 First complete implementation, installing is working now! GH-2172 Added sorting --- api/logic/net/NetJob.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api/logic/net/NetJob.cpp') diff --git a/api/logic/net/NetJob.cpp b/api/logic/net/NetJob.cpp index 304b5820..1ff8e28f 100644 --- a/api/logic/net/NetJob.cpp +++ b/api/logic/net/NetJob.cpp @@ -84,6 +84,10 @@ void NetJob::partProgress(int index, qint64 bytesReceived, qint64 bytesTotal) auto current = done * 1000 + doing * inprogress; auto current_total = all * 1000; // HACK: make sure it never jumps backwards. + // FAIL: This breaks if the size is not known (or is it something else?) and jumps to 1000, so if it is 1000 reset it to inprogress + if(m_current_progress == 1000) { + m_current_progress = inprogress; + } if(m_current_progress > current) { current = m_current_progress; -- cgit v1.2.3