mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Convert all foreach() to range-based for()
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/global.h"
|
||||
#include "base/torrentfilter.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
@@ -61,7 +62,7 @@ TransferListModel::TransferListModel(QObject *parent)
|
||||
{
|
||||
// Load the torrents
|
||||
using namespace BitTorrent;
|
||||
foreach (TorrentHandle *const torrent, Session::instance()->torrents())
|
||||
for (TorrentHandle *const torrent : copyAsConst(Session::instance()->torrents()))
|
||||
addTorrent(torrent);
|
||||
|
||||
// Listen for torrent changes
|
||||
|
||||
Reference in New Issue
Block a user