mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Make use of std algorithms
This commit is contained in:
@@ -86,9 +86,10 @@ TorrentContentModelItem *TorrentContentModelFolder::child(int row) const
|
||||
|
||||
TorrentContentModelFolder *TorrentContentModelFolder::childFolderWithName(const QString &name) const
|
||||
{
|
||||
for (TorrentContentModelItem *child : asConst(m_childItems))
|
||||
for (TorrentContentModelItem *child : asConst(m_childItems)) {
|
||||
if ((child->itemType() == FolderType) && (child->name() == name))
|
||||
return static_cast<TorrentContentModelFolder *>(child);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user