[Patch] SlaveBase progress...
craig at kde.org
Thu May 19 22:11:51 BST 2005
I've noticed, and so have others (http://bugs.kde.org/show_bug.cgi?id=96108),
that the progress data shown in the UI server's progress dialog is
inconsistent with the real progress.
Looking at kio/slavebase.cpp, I discovered that SlaveBase::processedSize()
only emits if it has been greater than 100ms since the last update. However,
when copying from file:/ to fonts:/ (or event to file:/) the frequency of
calling processedSize is quicker than 100ms, so most (all?) updates are not
For example, if I have a font of 99k, I call SlaveBase::totalSize() with this
value, and then read 32k chunks of date. For each chunk read I call
SlaveBase::processedSize(). As reading from a file is very fast, only the 1st
call to SlaveBase::processedSize() ever emits a signal. This causes the
progress bar to only be updated with the 1st 32k chunk of each file - with
the results being similar to the bug report mentioned above.
The attached patch "fixes" this by forcing an update if
processedSize==totalSize. Is this OK to commit? Or is there a better
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1913 bytes
Desc: not available
More information about the kde-core-devel