summaryrefslogtreecommitdiffstats
path: root/src/sql/models
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-02-15 13:43:37 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-02-17 16:17:50 +0000
commit6f7a5b0ecfa6e0490cd7bed501860ad920c15178 (patch)
tree410b99d0f2ceffbe87a62b6d2128439bb674a89a /src/sql/models
parent88e043a8bd1b49949777c90c75ff36314af7fe0f (diff)
QtSql: eradicate remaining Q_FOREACH loops
Change-Id: I86afe7104d506b840130517ae8066588fab2d745 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src/sql/models')
-rw-r--r--src/sql/models/qsqltablemodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 3612787fca..0bc86494f9 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -736,7 +736,8 @@ bool QSqlTableModel::submitAll()
bool success = true;
- foreach (int row, d->cache.keys()) {
+ const auto cachedKeys = d->cache.keys();
+ for (int row : cachedKeys) {
// be sure cache *still* contains the row since overridden selectRow() could have called select()
QSqlTableModelPrivate::CacheMap::iterator it = d->cache.find(row);
if (it == d->cache.end())