From bd84cb197f1c3165274e219f24cfbd6853924388 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 29 Aug 2007 15:00:31 +0000 Subject: [PATCH] - little optimization for torrentstopauseafterchecking --- src/bittorrent.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index c133ad0a8..16468bfb1 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -269,11 +269,6 @@ bool bittorrent::pauseTorrent(QString hash) { paused_file.open(QIODevice::WriteOnly | QIODevice::Text); paused_file.close(); } - // Remove from the list of torrents to pause after checking - int index = torrentsToPauseAfterChecking.indexOf(hash); - if(index != -1) { - torrentsToPauseAfterChecking.removeAt(index); - } return change; } @@ -1038,6 +1033,7 @@ void bittorrent::readAlerts() { qDebug("%s have just finished checking", hash.toUtf8().data()); int index = torrentsToPauseAfterChecking.indexOf(hash); if(index != -1) { + torrentsToPauseAfterChecking.removeAt(index); // Pause torrent pauseTorrent(hash); qDebug("%s was paused after checking", hash.toUtf8().data());