mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
- BUGFIX: Fixed an arithmetic exception that could happen in ETA calculation
This commit is contained in:
parent
dd65bb7292
commit
55fd750bfd
3 changed files with 3 additions and 2 deletions
|
@ -492,7 +492,7 @@ void GUI::updateDlList(){
|
|||
if(torrentStatus.download_payload_rate > 0){
|
||||
// Display "Downloading" status when connecting if download speed > 0
|
||||
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Downloading...")));
|
||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)(((qlonglong)ti.total_size()-(qlonglong)torrentStatus.total_done)/(qlonglong)torrentStatus.download_payload_rate)));
|
||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)((ti.total_size()-torrentStatus.total_done)/(double)torrentStatus.download_payload_rate)));
|
||||
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/downloading.png")), Qt::DecorationRole);
|
||||
setRowColor(row, "green");
|
||||
}else{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue