mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #174, was only partially fixed
This commit is contained in:
parent
169bca0a76
commit
4a66026676
|
@ -138,7 +138,7 @@ FileTransfertWidget::FileTransfertWidget(ToxFile File)
|
|||
buttonLayout->setSpacing(0);
|
||||
}
|
||||
|
||||
QString FileTransfertWidget::getHumanReadableSize(int size)
|
||||
QString FileTransfertWidget::getHumanReadableSize(unsigned long long size)
|
||||
{
|
||||
static const char* suffix[] = {"B","kiB","MiB","GiB","TiB"};
|
||||
int exp = 0;
|
||||
|
@ -161,7 +161,7 @@ void FileTransfertWidget::onFileTransferInfo(int FriendId, int FileNum, int64_t
|
|||
qWarning() << "FileTransfertWidget::onFileTransferInfo: Negative transfer speed !";
|
||||
diff = 0;
|
||||
}
|
||||
int rawspeed = diff / timediff;
|
||||
long rawspeed = diff / timediff;
|
||||
speed->setText(getHumanReadableSize(rawspeed)+"/s");
|
||||
size->setText(getHumanReadableSize(Filesize));
|
||||
if (!rawspeed)
|
||||
|
|
|
@ -49,7 +49,7 @@ private slots:
|
|||
void pauseResumeSend();
|
||||
|
||||
private:
|
||||
QString getHumanReadableSize(int size);
|
||||
QString getHumanReadableSize(unsigned long long size);
|
||||
|
||||
private:
|
||||
QLabel *pic, *filename, *size, *speed, *eta;
|
||||
|
|
Loading…
Reference in New Issue
Block a user