Bug 346044

Summary: Dolphin is not able to show 2 decimal places in file sizes
Product: [Applications] dolphin Reporter: cameronpoe
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aristsakas, bugseforuns, frank78ac, ilikefoss, justin.zobel, mail, meven29
Priority: NOR    
Version First Reported In: 4.12.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.
Comment 8 aristsakas 2026-01-01 22:48:07 UTC

*** This bug has been marked as a duplicate of bug 498820 ***
Comment 9 John 2026-01-27 11:13:09 UTC
(In reply to Méven Car from comment #7)
> 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.

I've been trying from time to time Plasma before version 5 and I don't remember seeing it, but ever since I moved to Plasma 5.16-20, I never say it in any way.
There is also no environment variable AFAIK from which it could be set.
I can't believe that such a customizable DE doesn't have a way to customize the precision or at least in my case, to increase it.
Especially in todays' world where having hundreds of gigabytes or tens of terabytes is pretty common. 

Why you wanted this to be closed as "NOT A BUG", when this functionality is definitely missing both in a graphical way and in a textual way (environment variable) and there are at lest 2 bug reports about it?

It seems that it was wrongly closed as a duplicate of my bug report, even though my bug report is newer and that's the duplicate.
But in a way it's good to be this way as my bug report also contains 2 images that better show this problem, so maybe it's easier to understand and replicate by the developers who will try to fix it.