mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
Do not display bytes values decimal digits
This commit is contained in:
parent
621ec11ae3
commit
67f41ad991
1 changed files with 2 additions and 0 deletions
|
@ -411,6 +411,8 @@ QString misc::friendlyUnit(double val) {
|
|||
char i = 0;
|
||||
while(val >= 1024. && i++<6)
|
||||
val /= 1024.;
|
||||
if(i == 0)
|
||||
return QString::number((long)val) + " " + units[0];
|
||||
return QString::number(val, 'f', 1) + " " + units[(int)i];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue