QSqlTableModel::setRecord(): use submit for OnFieldChange

submitAll() is supposed to be for OnManualSubmit.

Change-Id: Id0335fe731669bd24e1da72ab4724f88d6f1d905
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Mark Brand 2012-02-06 23:58:40 +01:00 committed by Qt by Nokia
parent dd84eab9d8
commit 471cd624e6

View File

@ -1246,7 +1246,7 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
if (d->strategy == OnManualSubmit && isOk)
emit dataChanged(createIndex(row, 0), createIndex(row, columnCount() - 1));
else if (d->strategy == OnFieldChange)
return submitAll();
return submit();
else if (d->strategy == OnManualSubmit)
return isOk;