summaryrefslogtreecommitdiffstats
path: root/src/sql/models/qsqltablemodel.cpp
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2014-04-25 17:55:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-27 20:39:11 +0200
commit373d858812a84b48be482dd64ad9d248ab2d5b3c (patch)
treec762771b1cdbce5e831de887ea5a03e9733e185b /src/sql/models/qsqltablemodel.cpp
parent1d372eddbe9e4eb75a0fcde4bdcdebcf75222075 (diff)
[QtSql][QSqlTableModel] fix failure to refresh in selectRow()
Caused by missing braces, leaving the break outside the scope of the if clause. Task-number: QTBUG-38509 Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src/sql/models/qsqltablemodel.cpp')
-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 5c73705d4c..0eed6ea4d3 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -448,9 +448,10 @@ bool QSqlTableModel::selectRow(int row)
// Look for changed values. Primary key fields are customarily first
// and probably change less often than other fields, so start at the end.
for (int f = curValues.count() - 1; f >= 0; --f) {
- if (curValues.value(f) != newValues.value(f))
+ if (curValues.value(f) != newValues.value(f)) {
needsAddingToCache = true;
break;
+ }
}
}
}