diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-28 07:57:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-28 05:03:59 -0700 |
commit | e3f8615054250d3e6fe0eb53f04bed229646e2d4 (patch) | |
tree | b9d1725ca3843447c36da8d997e999e493147b8d /qt-models | |
parent | ec586d0e0a19cb7af62506fc2a3cb2f53198bcb8 (diff) | |
download | subsurface-e3f8615054250d3e6fe0eb53f04bed229646e2d4.tar.gz |
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>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/filtermodels.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 4abdaf1d0..611c3b78d 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -124,7 +124,7 @@ void FilterModelBase::selectAll() void FilterModelBase::invertSelection() { - for (Item &item : items) + for (Item &item: items) item.checked = !item.checked; anyChecked = std::any_of(items.begin(), items.end(), [](Item &item) { return !!item.checked; }); 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'. QString persons = QString(d->buddy) + "," + QString(d->divemaster); QStringList personsList = persons.split(',', QString::SkipEmptyParts); - for (QString &s : personsList) + for (QString &s: personsList) s = s.trimmed(); // only show empty buddie dives if the user checked that. if (personsList.isEmpty()) |