Some porting from KIO::Jobs to KJobs
kevin.krammer at gmx.at
Thu Jan 18 10:51:11 GMT 2007
On Thursday 18 January 2007 01:43, David Faure wrote:
> On Wednesday 17 January 2007 13:01, Kevin Ottens wrote:
> > Le Mercredi 17 Janvier 2007 12:43, David Faure a écrit :
> > > This works for the case of loading contacts, but not when it's indeed
> > > about files. totalSize(2000) means 2000 bytes, not 2000 files, and you
> > > need totalFiles/totalDirs in addition.
> > Right now, totalSize is what's used for percentage computation... I
> > wonder what percent() is supposed to convey then.
> There are multiple levels.
> In uiserver percent is what matters:
> return i18n( "%1 % of %2 " ).arg( percent ).arg( KIO::convertSize(
> totalSize ) );
> Below, in the job (Job::emitPercent), the percent is calculated from
> processedSize and totalSize, to have that code in one place and not require
> that the ioslaves have to do it. The percent signal from the job is what
> goes to uiserver; so Thiago is wrong, it *is* used.
> [Someone then added SlaveBase::processedPercent though, for the case where
> the total size can't be known (e.g. kio_audiocd with compression), but
> that's not implemented yet.]
Maybe jobs with unknown total should be handled differently. e.g.like a
QProgressBar has a mode for total==0, but more explicit.
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel