Bug 346044 - Dolphin is not able to show 2 decimal places in file sizes
Summary: Dolphin is not able to show 2 decimal places in file sizes
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 4.12.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-10 09:53 UTC by cameronpoe
Modified: 2020-12-02 21:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cameronpoe 2015-04-10 09:53:05 UTC
Although it is set-up in KDE systemsettings to round file sizes to 2 decimal places, Dolphin and Konqueror show only 1 digit after comma :(
Can someone tell me how to fix it, please.

Reproducible: Always

Steps to Reproduce:
open Dolphin or Konqueror



Actual Results:  
file sizes are with only 1 decimal place although it is set-up in systemsettings to 2

Expected Results:  
it should show this amount of decimal places I am setting-up in systemsettings
Comment 1 cameronpoe 2015-04-10 11:39:27 UTC
Dolphin and Konqueror seem to ignore settings in System Settings -> Locale -> Country/Region & Language -> Numbers
But why? Could someone fix it, please.
Comment 2 Frank Reininghaus 2015-04-11 17:21:15 UTC
Thanks for the bug report. Dolphin 4.12.3 uses this to determine the text which should be displayed in the "Size" column:

text = KGlobal::locale()->formatByteSize(size);

So it seems that the problem is in kdelibs. I hope that "klocale" is the right component.
Comment 3 cameronpoe 2015-04-16 19:34:47 UTC
But  John Layt said in bug 312646 :
"It looks like Dolphin uses the default formatByteSize() method which defaults to 1 decimal place and the default algorithm described below, rather than newer api which allows you to set the required significant digits and units to use (http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKLocale.html#a566a3d868abfca050e1191b16e85ed73).  Perhaps a quick initial fix will be for Dolphin to define 2 decimal places?"
Comment 4 Frank Reininghaus 2015-04-16 20:55:47 UTC
Thanks for the hint, I completely forgot about the old report. I'll reassign to Dolphin then, but I'm not really sure why the formatByteSize function which does not take a 'precision' argument just ignores the setting in System Settings. Forcing each application to retrieve the setting and then pass it to the formatByteSize overload which takes a 'precision' argument does not look like the most maintainable and future-proof solution to me :-/
Comment 5 Julian Steinmann 2018-04-11 19:25:37 UTC
I can still reproduce this bug with Dolphin 17.12.3. I'll set the status to CONFIRMED, but I fear that a good fix won't be very easy to implement.
Comment 6 Justin Zobel 2020-10-26 01:50:29 UTC
Can confirm still an issue with Dolphin on git master.
Comment 7 Méven Car 2020-12-02 21:32:29 UTC
Please correct me if I am mistaken, I believe this setting for decimal place for file size does not exist anymore, since Plasma 5 I would guess.

I could not find a trace of it in code and although I remember using it, it is not in the format kcm.

So I suggest to close this as "NOT A BUG".

If people miss the setting they should open a different bug.