1
0
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:
Tux3 / Mlkj / !Lev.uXFMLA 2014-08-31 23:07:07 +02:00
parent 628d9a0aae
commit c54cfd6ff3

View File

@ -144,7 +144,7 @@ QString FileTransfertWidget::getHumanReadableSize(unsigned long long size)
int exp = 0; int exp = 0;
if (size) if (size)
exp = std::min( (int) (log(size) / log(1024)), (int) (sizeof(suffix) / sizeof(suffix[0]) - 1)); 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) void FileTransfertWidget::onFileTransferInfo(int FriendId, int FileNum, int64_t Filesize, int64_t BytesSent, ToxFile::FileDirection Direction)