mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Split TorrentHandle interface and implementation
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
#include <QTextStream>
|
||||
#include <QToolTip>
|
||||
|
||||
#include "base/indexrange.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/bittorrent/torrentinfo.h"
|
||||
#include "base/utils/misc.h"
|
||||
|
||||
namespace
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <QUrl>
|
||||
|
||||
#include "base/bittorrent/downloadpriority.h"
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/preferences.h"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <QUrl>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/bittorrent/trackerentry.h"
|
||||
@@ -223,7 +224,7 @@ void StatusFilterWidget::updateTorrentNumbers()
|
||||
int nbStalledDownloading = 0;
|
||||
int nbErrored = 0;
|
||||
|
||||
const QHash<BitTorrent::InfoHash, BitTorrent::TorrentHandle *> torrents = BitTorrent::Session::instance()->torrents();
|
||||
const QVector<BitTorrent::TorrentHandle *> torrents = BitTorrent::Session::instance()->torrents();
|
||||
for (const BitTorrent::TorrentHandle *torrent : torrents) {
|
||||
if (torrent->isDownloading())
|
||||
++nbDownloading;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QStringList>
|
||||
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/global.h"
|
||||
#include "base/types.h"
|
||||
|
||||
@@ -652,7 +652,7 @@ void TransferListWidget::copySelectedMagnetURIs() const
|
||||
{
|
||||
QStringList magnetUris;
|
||||
for (BitTorrent::TorrentHandle *const torrent : asConst(getSelectedTorrents()))
|
||||
magnetUris << torrent->toMagnetUri();
|
||||
magnetUris << torrent->createMagnetURI();
|
||||
|
||||
qApp->clipboard()->setText(magnetUris.join('\n'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user