1
mirror of https://github.com/qbittorrent/qBittorrent synced 2024-11-17 03:48:39 +01: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){
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, 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");
}else{
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Stalled", "state of a torrent whose DL Speed is 0")));