forked from qt-creator/qt-creator
Git: Eradicate Q_FOREACH loops
Change-Id: I29b6071ea244d1b3ae0701d36c90b1e93cf21fbb Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
e3eee3b2b9
commit
e366e135b7
@@ -85,7 +85,7 @@ void StashModel::setStashes(const QList<Stash> &stashes)
|
||||
m_stashes = stashes;
|
||||
if (const int rows = rowCount())
|
||||
removeRows(0, rows);
|
||||
foreach (const Stash &s, stashes)
|
||||
for (const Stash &s : stashes)
|
||||
appendRow(stashModelRowItems(s));
|
||||
}
|
||||
|
||||
@@ -354,7 +354,8 @@ int StashDialog::currentRow() const
|
||||
QList<int> StashDialog::selectedRows() const
|
||||
{
|
||||
QList<int> rc;
|
||||
foreach (const QModelIndex &proxyIndex, ui->stashView->selectionModel()->selectedRows()) {
|
||||
const QModelIndexList rows = ui->stashView->selectionModel()->selectedRows();
|
||||
for (const QModelIndex &proxyIndex : rows) {
|
||||
const QModelIndex index = m_proxyModel->mapToSource(proxyIndex);
|
||||
if (index.isValid())
|
||||
rc.push_back(index.row());
|
||||
|
||||
Reference in New Issue
Block a user