mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-08 03:26:16 +00:00
Whitespace: make range based for loops consistent in filtermodels.cpp
Consistently use "for(item: items)" instead if "for(item : items)". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ec586d0e0a
commit
e3f8615054
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ void FilterModelBase::selectAll()
|
||||||
|
|
||||||
void FilterModelBase::invertSelection()
|
void FilterModelBase::invertSelection()
|
||||||
{
|
{
|
||||||
for (Item &item : items)
|
for (Item &item: items)
|
||||||
item.checked = !item.checked;
|
item.checked = !item.checked;
|
||||||
anyChecked = std::any_of(items.begin(), items.end(), [](Item &item) { return !!item.checked; });
|
anyChecked = std::any_of(items.begin(), items.end(), [](Item &item) { return !!item.checked; });
|
||||||
emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, 0));
|
emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, 0));
|
||||||
|
@ -258,7 +258,7 @@ bool BuddyFilterModel::doFilter(const dive *d) const
|
||||||
// Checked means 'Show', Unchecked means 'Hide'.
|
// Checked means 'Show', Unchecked means 'Hide'.
|
||||||
QString persons = QString(d->buddy) + "," + QString(d->divemaster);
|
QString persons = QString(d->buddy) + "," + QString(d->divemaster);
|
||||||
QStringList personsList = persons.split(',', QString::SkipEmptyParts);
|
QStringList personsList = persons.split(',', QString::SkipEmptyParts);
|
||||||
for (QString &s : personsList)
|
for (QString &s: personsList)
|
||||||
s = s.trimmed();
|
s = s.trimmed();
|
||||||
// only show empty buddie dives if the user checked that.
|
// only show empty buddie dives if the user checked that.
|
||||||
if (personsList.isEmpty())
|
if (personsList.isEmpty())
|
||||||
|
|
Loading…
Add table
Reference in a new issue