From 25f0964c9bc843bc0d2b476b35ecc4534073f986 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 3 Oct 2006 00:42:38 +0000 Subject: [PATCH] - fixed an arithmetic exception --- src/GUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 9f5c214ee..1a8437c67 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -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")));