Do not display bytes values decimal digits

This commit is contained in:
Christophe Dumez 2010-06-27 14:19:24 +00:00
parent 621ec11ae3
commit 67f41ad991

View file

@ -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];
}