Summary: | Incorrect total speed is displayed on multithread transfers | ||
---|---|---|---|
Product: | [Applications] kftpgrabber | Reporter: | David Gnedt <david.gnedt> |
Component: | general | Assignee: | Jernej Kos <kostko> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch to fix this bug |
Description
David Gnedt
2007-04-21 16:40:17 UTC
Created attachment 20347 [details]
patch to fix this bug
SVN commit 656501 by kostko: Commited a patch by David Gnedt that fixes incorrect total speed display for multithreaded transfers. BUG: 144493 M +11 -2 queueobject.cpp M +1 -1 queueobject.h --- trunk/extragear/network/kftpgrabber/src/queueobject.cpp #656500:656501 @@ -121,13 +121,22 @@ void QueueObject::setSpeed(filesize_t speed) { - if (m_speed == speed) + if (speed != 0 && m_speed == speed) return; m_speed = speed; + QPtrListIterator<QueueObject> it(m_children); + QueueObject *i; + + while ((i = it.current()) != 0) { + ++it; + + m_speed += i->getSpeed(); + } + if (hasParentObject()) - parentObject()->setSpeed(speed); + parentObject()->setSpeed(); statisticsUpdated(); } --- trunk/extragear/network/kftpgrabber/src/queueobject.h #656500:656501 @@ -194,7 +194,7 @@ * * @param speed Speed to set */ - void setSpeed(filesize_t speed); + void setSpeed(filesize_t speed = 0); /** * Returns the KFTPQueue::Transfer::Type of this transfer. This can either be |