mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Improve Status Filter
replaces quadratic update operation with linear
This commit is contained in:
@@ -2085,6 +2085,11 @@ QVector<Torrent *> Session::torrents() const
|
||||
return result;
|
||||
}
|
||||
|
||||
qsizetype Session::torrentsCount() const
|
||||
{
|
||||
return m_torrents.size();
|
||||
}
|
||||
|
||||
bool Session::addTorrent(const QString &source, const AddTorrentParams ¶ms)
|
||||
{
|
||||
// `source`: .torrent file path/url or magnet uri
|
||||
|
||||
@@ -459,6 +459,7 @@ namespace BitTorrent
|
||||
void startUpTorrents();
|
||||
Torrent *findTorrent(const TorrentID &id) const;
|
||||
QVector<Torrent *> torrents() const;
|
||||
qsizetype torrentsCount() const;
|
||||
bool hasActiveTorrents() const;
|
||||
bool hasUnfinishedTorrents() const;
|
||||
bool hasRunningSeed() const;
|
||||
|
||||
Reference in New Issue
Block a user