From 7030f858268ff15b2fa7648bf29d416030da2026 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 19 Aug 2007 14:48:16 +0000 Subject: [PATCH] - Added an assert to check that progress value is < 100% - Modified a test due to a bug in libtorrent for #133480 --- src/FinishedTorrents.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index dba45eb89..a74a8eecd 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -173,7 +173,8 @@ void FinishedTorrents::updateFinishedList(){ continue; } if(h.is_paused()) continue; - if(torrentStatus.state == torrent_status::downloading || (torrentStatus.state != torrent_status::checking_files && torrentStatus.state != torrent_status::queued_for_checking && torrentStatus.progress != 1.)) { + Q_ASSERT(torrentStatus.progress <= 1.); + if(torrentStatus.state == torrent_status::downloading || (torrentStatus.state != torrent_status::checking_files && torrentStatus.state != torrent_status::queued_for_checking && torrentStatus.progress < 1.)) { // What are you doing here? go back to download tab! qDebug("Info: a torrent was moved from finished to download tab"); deleteFromFinishedList(hash);