From 1225d1641313adf87ef5f2e5d255398f377bfbd7 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 27 Dec 2008 09:21:09 +0000 Subject: [PATCH] - Removed code that is no longer needed --- src/GUI.cpp | 2 +- src/bittorrent.cpp | 10 ---------- src/bittorrent.h | 3 --- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index faa896385..3c4f652a1 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -393,7 +393,7 @@ void GUI::fullDiskError(QTorrentHandle& h) const { // Download will be paused by libtorrent. Updating GUI information accordingly QString hash = h.hash(); qDebug("Full disk error, pausing torrent %s", hash.toUtf8().data()); - if(BTSession->isFinished(hash)) { + if(h.is_seed()) { // In finished list qDebug("Automatically paused torrent was in finished list"); finishedTorrentTab->pauseTorrent(hash); diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 9a18904d4..e809e1f08 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -164,12 +164,6 @@ void bittorrent::decreaseDlTorrentPriority(QString hash) { h.queue_position_down(); } -bool bittorrent::isTorrentQueued(QString hash) const { - Q_ASSERT(queueingEnabled); - QTorrentHandle h = getTorrentHandle(hash); - return h.is_queued(); -} - void bittorrent::setUploadLimit(QString hash, long val) { qDebug("Set upload limit rate to %ld", val); QTorrentHandle h = getTorrentHandle(hash); @@ -304,10 +298,6 @@ void bittorrent::deleteTorrent(QString hash, bool permanent) { emit deletedTorrent(hash); } -bool bittorrent::isFinished(QString hash) const { - return getTorrentHandle(hash).is_seed(); -} - // Pause a running torrent bool bittorrent::pauseTorrent(QString hash) { bool change = false; diff --git a/src/bittorrent.h b/src/bittorrent.h index 508fcd4c8..a5b0414b5 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -86,7 +86,6 @@ class bittorrent : public QObject { float getRealRatio(QString hash) const; session* getSession() const; QHash getTrackersErrors(QString hash) const; - bool isFinished(QString hash) const; bool has_filtered_files(QString hash) const; unsigned int getFinishedPausedTorrentsNb() const; unsigned int getUnfinishedPausedTorrentsNb() const; @@ -95,8 +94,6 @@ class bittorrent : public QObject { int getUpTorrentPriority(QString hash) const; int getMaximumActiveDownloads() const; int getMaximumActiveTorrents() const; - bool isTorrentQueued(QString hash) const; - bool is_auto_managed() const; int loadTorrentPriority(QString hash); QStringList getConsoleMessages() const; QStringList getPeerBanMessages() const;