Some porting from KIO::Jobs to KJobs

Ricard Marxer Piñón rmarxer at iua.upf.edu
Wed Jan 17 11:50:59 GMT 2007


David Faure wrote:
> On Wednesday 17 January 2007 10:39, Kevin Ottens wrote:
>   
>>> There's a meaning attached to it too.
>>> totalSize could be about any kind of data. totalFiles is more specifically
>>> about files. Maybe we need an API for telling uiserver what kind of objects
>>> it's about, so that loaidng 2000 contacts shows "1 / 2000 contacts" instead
>>> of "1 / 2000 files".
>>>       
>> That was exactly my point. totalSize() is enough, you just need a way to 
>> specify the unit.
>>     
>
> 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.
>
> So generalizing this leads to totalSize / totalItems / totalOtherItems ? ;)
>   
This should not replace the slotPercent methods, right?

Generalizing even more it could lead to progressDescription(QString) and 
it's to the application to build the strings which I don't think is that 
hard.

Some jobs might not even be made of subitems or they can be of different 
nature.

I agree these methods could be in KJob as helper functions, but should 
the Observer know about them?  or should the Observer receive them as a 
simple progress description string.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the kde-core-devel mailing list