io-slave & progress dialog

David Faure faure at kde.org
Wed May 19 17:28:44 BST 2004


On Wednesday 19 May 2004 12:13, Craig Drummond wrote:
> > We're talking about copy, not put, if you're copying file from the local
> > system, right?
> 
> Nope. When I copy from file:/home/craig to fonts:/Personal it's the put
> function of KioFonts that is called - I assume because source and dest are
> different protocols.
No - copy() is called for copies to and from file:/, when the slave supports it.
This depends on 
copyToFile=true
copyFromFile=true
in the slave's .protocol file

But before using copy(), let's debug the put() case...

> There seems to be only 1 call to set the processed size - in this case to
> 98304, whereas the file size is actually 188825.
> 
> On the fonts:/ (i.e. destination) side  - what would trigger the updating of
> processedSize?
Nothing. When FileCopyJob uses a get and put job, the progress info depends
on the get. Which makes this problem even more surprising...
Especially surprising since get() in file.cc emits processedSize once more
right before the end, with the file's size.... I think you're missing something,
SimpleJob::slotProcessedSize() is surely called more than once.

Is the file fully copied?
Check if FileCopyJob::setSourceSize64() is called with the right value?
[If not, the stat() is the problem. But then again, this is on the file:/ side....]

BTW KioFonts.cpp:947 has if(a) if(b) {..} else {...} , a bit unclear, better use
braces in the toplevel if....

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




More information about the kde-core-devel mailing list