mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
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:
parent
35731b96dc
commit
0b4fef19f6
52 changed files with 647 additions and 647 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue