Remove redundant suffix from TorrentHandle class

Originally, it was just a wrapper for libtorrent::torrent_handle class, so it mimicked its name.
It was then transformed into a more complex aggregate, but the name was retained (just by inertia).
Unlike libtorrent::torrent_handle class in whose name "handle" means the pattern used,
it does not matter for qBittorrent classes and just eats up space in the source code.
This commit is contained in:
Vladimir Golovnev (Glassez) 2021-01-06 15:12:40 +03:00 committed by sledgehammer999
parent 0cbd15890a
commit 1880082017
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
52 changed files with 647 additions and 647 deletions

View file

@ -38,7 +38,7 @@
#include "base/bittorrent/peeraddress.h"
#include "base/bittorrent/peerinfo.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/bittorrent/torrent.h"
#include "base/bittorrent/trackerentry.h"
#include "base/global.h"
#include "base/net/geoipmanager.h"
@ -458,7 +458,7 @@ void SyncController::maindataAction()
QVariantHash torrents;
QHash<QString, QStringList> trackers;
for (const BitTorrent::TorrentHandle *torrent : asConst(session->torrents()))
for (const BitTorrent::Torrent *torrent : asConst(session->torrents()))
{
const BitTorrent::InfoHash torrentHash = torrent->hash();
@ -542,7 +542,7 @@ void SyncController::torrentPeersAction()
auto lastAcceptedResponse = sessionManager()->session()->getData(QLatin1String("syncTorrentPeersLastAcceptedResponse")).toMap();
const QString hash {params()["hash"]};
const BitTorrent::TorrentHandle *torrent = BitTorrent::Session::instance()->findTorrent(hash);
const BitTorrent::Torrent *torrent = BitTorrent::Session::instance()->findTorrent(hash);
if (!torrent)
throw APIError(APIErrorType::NotFound);