mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
Convert all foreach() to range-based for()
This commit is contained in:
parent
d668a4fe6d
commit
6b1d26d555
64 changed files with 326 additions and 292 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue