From 4d0cdea1c9cf3ef5140b9ef97465d23c2ace683b Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 23 Jan 2010 19:17:31 +0000 Subject: [PATCH] Make sure invalid torrent are removed from the transfer list --- Changelog | 1 + src/transferlistwidget.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Changelog b/Changelog index 34d9de491..bb3deb740 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ * Unreleased - Christophe Dumez - v2.1.2 - BUGFIX: Fix issue causing torrents not to be displayed in the list + - BUGFIX: Make sure invalid torrent are removed from the transfer list - BUGFIX: Fix overwrite check when renaming a folder in a torrent - BUGFIX: Force a recheck after renaming files to avoid overwriting - BUGFIX: Improve "Open destination folder" behavior diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 572bb513f..a7c0ade14 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -459,6 +459,7 @@ void TransferListWidget::refreshList() { } } + QStringList bad_hashes; for(int i=0; irowCount(); ++i) { int s = updateTorrent(i); switch(s) { @@ -484,10 +485,18 @@ void TransferListWidget::refreshList() { ++nb_seeding; ++nb_inactive; break; + case STATE_INVALID: + bad_hashes << getHashFromRow(i); + break; default: break; } } + // Remove bad torrents from list + foreach(QString hash, bad_hashes) { + deleteTorrent(getRowFromHash(hash), false); + } + // Update status filters counters emit torrentStatusUpdate(nb_downloading, nb_seeding, nb_active, nb_inactive); repaint(); }