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

Never use [-]9.9e[+|-]999 format for human readable numbers

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-08-31 13:27:42 +02:00
parent 51f397104c
commit 6668cdc1e7

View File

@ -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),'g',3).append(suffix[exp]);
return QString().setNum(size / pow(1024, exp),'f',3).append(suffix[exp]);
}
void FileTransfertWidget::onFileTransferInfo(int FriendId, int FileNum, int64_t Filesize, int64_t BytesSent, ToxFile::FileDirection Direction)