From ab0355f8d699d6f796a525ad07052d9029a19318 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 25 Sep 2011 16:22:56 +0300 Subject: [PATCH] Web UI: Remove unused code --- src/webui/httpconnection.cpp | 29 ++++++----------------------- src/webui/httpconnection.h | 1 - 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/webui/httpconnection.cpp b/src/webui/httpconnection.cpp index dd9d5d018..26f2f209b 100644 --- a/src/webui/httpconnection.cpp +++ b/src/webui/httpconnection.cpp @@ -105,11 +105,11 @@ void HttpConnection::translateDocument(QString& data) { static QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),%ยต&\\-\\.]+)\\)")); static QRegExp mnemonic("\\(?&([a-zA-Z]?\\))?"); const std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", - "PropertiesWidget", "MainWindow", "HttpServer", - "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", - "options_imp", "Preferences", "TrackersAdditionDlg", - "ScanFoldersModel", "PropTabBar", "TorrentModel", - "downloadFromURL"}; + "PropertiesWidget", "MainWindow", "HttpServer", + "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", + "options_imp", "Preferences", "TrackersAdditionDlg", + "ScanFoldersModel", "PropTabBar", "TorrentModel", + "downloadFromURL"}; int i = 0; bool found; @@ -570,27 +570,10 @@ void HttpConnection::respondCommand(const QString& command) { recheckTorrent(m_parser.post("hash")); return; } - if(command == "recheckall"){ - recheckAllTorrents(); - return; - } } void HttpConnection::recheckTorrent(const QString& hash) { - QTorrentHandle h = QBtSession::instance()->getTorrentHandle(hash); - if(h.is_valid()){ - QBtSession::instance()->recheckTorrent(h.hash()); - } -} - -void HttpConnection::recheckAllTorrents() { - std::vector torrents = QBtSession::instance()->getTorrents(); - std::vector::iterator torrentIT; - for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) { - QTorrentHandle h = QTorrentHandle(*torrentIT); - if(h.is_valid()) - QBtSession::instance()->recheckTorrent(h.hash()); - } + QBtSession::instance()->recheckTorrent(hash); } void HttpConnection::decreaseTorrentsPriority(const QStringList &hashes) diff --git a/src/webui/httpconnection.h b/src/webui/httpconnection.h index 9c7ae1e11..2eedc9cc0 100644 --- a/src/webui/httpconnection.h +++ b/src/webui/httpconnection.h @@ -66,7 +66,6 @@ protected slots: void processDownloadedFile(const QString& url, const QString& file_path); void handleDownloadFailure(const QString& url, const QString& reason); void recheckTorrent(const QString& hash); - void recheckAllTorrents(); void decreaseTorrentsPriority(const QStringList& hashes); void increaseTorrentsPriority(const QStringList& hashes);