[PATCH] Make KDiskFreeSpace more convenient -> KJob-like usage

Sebastian TrĂ¼g strueg at mandriva.com
Wed Jul 23 10:14:41 BST 2008


please find attached a patch for KDiskFreeSpace. I found it to be very 
inconvenient to use. You would have to connect to two signals of a one-shot 
object. That is really not nice. So the patch transforms the usage to 
something very similar to KJob: a finished signal which has the 
KDiskFreeSpace as parameter. You then check for success and get the actual 
values from the object. Afterwards it is deleted as before. 
Oh, and it now uses byte values instead of Kib. I don't really see the reason 
there. Also, we are in KIO, so I thought KIO::filesize_t was appropriate.

BTW: a one-shot-object that you can create yourself? IMHO it should only 
delete itself when used through the static method.

May I commit? BC is no problem, old API is marked deprecated (in documentation 
that is).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdiskfreespace.diff
Type: text/x-diff
Size: 7689 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080723/5d8ee2a0/attachment.diff>

More information about the kde-core-devel mailing list