KIO::convertSize(.,.) vs. KFormat::formatByteSize(...)

Michael Pyne mpyne at kde.org
Fri Jan 24 00:27:23 UTC 2014


On Thu, January 23, 2014 23:43:36 Friedrich W. H. Kossebau wrote:
> Hi,
> 
> I see a few overlappings between methods in KFormat (KCoreAddons) and KIO
> (KIOCore), mainly this pair:

> Questions:
> 
> Q2) Should KIO::convertSize(...) not use KFormat::formatByteSize(...) behind
> the scenes? (At least if it is turned into a deprecated method in the
> future?) KIOCore currently already depends on KCoreAddons (due to KJob).
> Would be strange if programs built on KF5 display file sizes differently,
> due to different respected settings in the both methods.

I would tend to agree we should use KFormat if we can but that one is not up 
to me.

> Q3) Is double as type of parameter size for KFormat::formatByteSize(...)
> really a good choice?
> I would expect the type to be rather qulonglong, like it is with
> KIO::convertSize(...). I have looked at many files with Okteta, but so for
> not seen a file with a fraction byte ;)

I think you're right. I forget why this was a double (I worked on this code 
but I believe the API pre-dated my involvement).

How would this go about being changed? Are we still doing "BIC Mondays" ;) or 
should I just do a review request?

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140123/9bdb8370/attachment.sig>


More information about the Kde-frameworks-devel mailing list