[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>bb10
parent
1d372eddbe
commit
373d858812
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue