mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Use range-based for loops
This commit is contained in:
@@ -69,9 +69,8 @@ void TorrentContentTreeView::keyPressEvent(QKeyEvent *event)
|
||||
|
||||
const QModelIndexList selection = selectionModel()->selectedRows(TorrentContentModelItem::COL_NAME);
|
||||
|
||||
for (QModelIndexList::const_iterator i = selection.begin(); i != selection.end(); ++i) {
|
||||
QModelIndex index = *i;
|
||||
Q_ASSERT(i->column() == TorrentContentModelItem::COL_NAME);
|
||||
for (const QModelIndex &index : selection) {
|
||||
Q_ASSERT(index.column() == TorrentContentModelItem::COL_NAME);
|
||||
model()->setData(index, state, Qt::CheckStateRole);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user