1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

show 2 decimals starting from MiB

This commit is contained in:
krepa098 2015-01-20 11:08:40 +01:00
parent 2fa2fc1df5
commit d0bd6e9dca

View File

@ -256,7 +256,7 @@ QString FileTransferWidget::getHumanReadableSize(qint64 size)
if (size > 0)
exp = std::min( (int) (log(size) / log(1024)), (int) (sizeof(suffix) / sizeof(suffix[0]) - 1));
return QString().setNum(size / pow(1024, exp),'f', exp > 2 ? 2 : 0).append(suffix[exp]);
return QString().setNum(size / pow(1024, exp),'f', exp > 1 ? 2 : 0).append(suffix[exp]);
}
void FileTransferWidget::hideWidgets()