From 55fd750bfdbfb7b3012728bca774d792325fca68 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 3 Oct 2006 00:28:41 +0000 Subject: [PATCH] - BUGFIX: Fixed an arithmetic exception that could happen in ETA calculation --- Changelog | 1 + src/GUI.cpp | 2 +- src/about_imp.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 7f7d1744d..7c105ced9 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,7 @@ - BUGFIX: Remove torrent file from scanned directory if it is already in download list - BUGFIX: Fixed possible segfault on loading due to columns size loading - BUGFIX: Fixed problems that could happen with delete selection action + - BUGFIX: Fixed an arithmetic exception that could happen in ETA calculation - COSMETIC: Now displaying the number of downloads in tab title - COSMETIC: Redesigned download from url dialog - COSMETIC: Added a message to warn user that we started download from an url diff --git a/src/GUI.cpp b/src/GUI.cpp index a9940195e..9f5c214ee 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -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{ diff --git a/src/about_imp.h b/src/about_imp.h index 4c564e2dd..5d03f2abe 100644 --- a/src/about_imp.h +++ b/src/about_imp.h @@ -23,7 +23,7 @@ #define ABOUT_H #include "ui_about.h" -#define VERSION "v0.7.0rc3" +#define VERSION "v0.7.0rc4" class about : public QDialog, private Ui::AboutDlg{ Q_OBJECT