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:
parent
2fa2fc1df5
commit
d0bd6e9dca
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user