[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [Patch] SlaveBase progress...
From:       David Faure <faure () kde ! org>
Date:       2005-05-19 21:45:18
Message-ID: 200505192345.19248.faure () kde ! org
[Download RAW message or body]

On Thursday 19 May 2005 23:11, Craig Drummond wrote:
> 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 
> emitted. 
> 
> 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 
> solution?

Good catch!
Thanks.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic