mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06: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:
@@ -33,7 +33,7 @@
|
||||
#include <QVector>
|
||||
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/bittorrent/torrent.h"
|
||||
#include "base/bittorrent/trackerentry.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
||||
QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
||||
{
|
||||
QVariantMap ret =
|
||||
{
|
||||
@@ -136,7 +136,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
||||
};
|
||||
|
||||
const qreal ratio = torrent.realRatio();
|
||||
ret[KEY_TORRENT_RATIO] = (ratio > BitTorrent::TorrentHandle::MAX_RATIO) ? -1 : ratio;
|
||||
ret[KEY_TORRENT_RATIO] = (ratio > BitTorrent::Torrent::MAX_RATIO) ? -1 : ratio;
|
||||
|
||||
if (torrent.isPaused() || torrent.isChecking())
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class TorrentHandle;
|
||||
class Torrent;
|
||||
}
|
||||
|
||||
// Torrent keys
|
||||
@@ -82,4 +82,4 @@ const char KEY_TORRENT_AUTO_TORRENT_MANAGEMENT[] = "auto_tmm";
|
||||
const char KEY_TORRENT_TIME_ACTIVE[] = "time_active";
|
||||
const char KEY_TORRENT_AVAILABILITY[] = "availability";
|
||||
|
||||
QVariantMap serialize(const BitTorrent::TorrentHandle &torrent);
|
||||
QVariantMap serialize(const BitTorrent::Torrent &torrent);
|
||||
|
||||
Reference in New Issue
Block a user