Browse Source

Do not display bytes values decimal digits

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
67f41ad991
  1. 2
      src/misc.cpp

2
src/misc.cpp

@ -411,6 +411,8 @@ QString misc::friendlyUnit(double val) {
char i = 0; char i = 0;
while(val >= 1024. && i++<6) while(val >= 1024. && i++<6)
val /= 1024.; val /= 1024.;
if(i == 0)
return QString::number((long)val) + " " + units[0];
return QString::number(val, 'f', 1) + " " + units[(int)i]; return QString::number(val, 'f', 1) + " " + units[(int)i];
} }

Loading…
Cancel
Save