mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Display a ratio of 0.0 if total_upload and total_download are both 0
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- BUGFIX: Cleanly fixed popup menus position in lists (no more workarounds)
|
- BUGFIX: Cleanly fixed popup menus position in lists (no more workarounds)
|
||||||
- BUGFIX: Fixed memory leak in search engine
|
- BUGFIX: Fixed memory leak in search engine
|
||||||
- BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences
|
- BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences
|
||||||
|
- BUGFIX: Display a ratio of 0.0 if total_upload and total_download are both 0
|
||||||
|
|
||||||
* Sun Apr 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.3
|
* Sun Apr 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.3
|
||||||
- BUGFIX: Fixed Web UI torrent upload form
|
- BUGFIX: Fixed Web UI torrent upload form
|
||||||
|
|||||||
@@ -771,6 +771,8 @@ float bittorrent::getRealRatio(QString hash) const{
|
|||||||
Q_ASSERT(h.all_time_download() >= 0);
|
Q_ASSERT(h.all_time_download() >= 0);
|
||||||
Q_ASSERT(h.all_time_upload() >= 0);
|
Q_ASSERT(h.all_time_upload() >= 0);
|
||||||
if(h.all_time_download() == 0) {
|
if(h.all_time_download() == 0) {
|
||||||
|
if(h.all_time_upload() == 0)
|
||||||
|
return 0;
|
||||||
return 101;
|
return 101;
|
||||||
}
|
}
|
||||||
float ratio = (float)h.all_time_upload()/(float)h.all_time_download();
|
float ratio = (float)h.all_time_upload()/(float)h.all_time_download();
|
||||||
|
|||||||
@@ -577,6 +577,7 @@ void DownloadingTorrents::addTorrent(QString hash) {
|
|||||||
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.));
|
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.));
|
||||||
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0")));
|
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0")));
|
||||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
||||||
|
DLListModel->setData(DLListModel->index(row, RATIO), QVariant((double)0.));
|
||||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
||||||
if(BTSession->isQueueingEnabled())
|
if(BTSession->isQueueingEnabled())
|
||||||
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
||||||
|
|||||||
Reference in New Issue
Block a user