mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Reduce precision of human readable, now more readable!
This commit is contained in:
parent
628d9a0aae
commit
c54cfd6ff3
|
@ -144,7 +144,7 @@ QString FileTransfertWidget::getHumanReadableSize(unsigned long long size)
|
|||
int exp = 0;
|
||||
if (size)
|
||||
exp = std::min( (int) (log(size) / log(1024)), (int) (sizeof(suffix) / sizeof(suffix[0]) - 1));
|
||||
return QString().setNum(size / pow(1024, exp),'f',3).append(suffix[exp]);
|
||||
return QString().setNum(size / pow(1024, exp),'f',2).append(suffix[exp]);
|
||||
}
|
||||
|
||||
void FileTransfertWidget::onFileTransferInfo(int FriendId, int FileNum, int64_t Filesize, int64_t BytesSent, ToxFile::FileDirection Direction)
|
||||
|
|
Loading…
Reference in New Issue
Block a user