1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-27 23:14:31 +00:00

- fixed an arithmetic exception

This commit is contained in:
Christophe Dumez 2006-10-03 00:42:38 +00:00
parent 55fd750bfd
commit 25f0964c9b

View File

@ -510,7 +510,7 @@ void GUI::updateDlList(){
if(torrentStatus.download_payload_rate > 0){ if(torrentStatus.download_payload_rate > 0){
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Downloading..."))); DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Downloading...")));
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/downloading.png")), Qt::DecorationRole); DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/downloading.png")), Qt::DecorationRole);
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)));
setRowColor(row, "green"); setRowColor(row, "green");
}else{ }else{
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Stalled", "state of a torrent whose DL Speed is 0"))); DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Stalled", "state of a torrent whose DL Speed is 0")));