mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Fixed download progress for files larger than 2GiB
This commit is contained in:
parent
c10026a3a2
commit
3ea69331d4
@ -227,7 +227,7 @@ void ContentManagerModel::startDownload(QModelIndex index)
|
||||
QTimer *timer = new QTimer(this);
|
||||
connect(timer, &QTimer::timeout, this, [=]() {
|
||||
auto downloadInfos = KiwixApp::instance()->getContentManager()->updateDownloadInfos(id, {"status", "completedLength", "totalLength", "downloadSpeed"});
|
||||
double percent = (double) downloadInfos["completedLength"].toInt() / downloadInfos["totalLength"].toInt();
|
||||
double percent = downloadInfos["completedLength"].toDouble() / downloadInfos["totalLength"].toDouble();
|
||||
percent *= 100;
|
||||
percent = QString::number(percent, 'g', 3).toDouble();
|
||||
auto completedLength = convertToUnits(downloadInfos["completedLength"].toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user