diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2010-11-03 01:58:36 (GMT) |
---|---|---|
committer | Michael Goddard <michael.goddard@nokia.com> | 2011-02-04 05:41:02 (GMT) |
commit | 3bed865c35d8eb920ba5a68276fdf1690c834a64 (patch) | |
tree | dd733baba6540ab7089b5e2d0e7358b344476546 /src/sql/models | |
parent | 9c61e9a40e774fe32b16c133a5cdd6b9d9d29d83 (diff) | |
download | Qt-3bed865c35d8eb920ba5a68276fdf1690c834a64.zip Qt-3bed865c35d8eb920ba5a68276fdf1690c834a64.tar.gz Qt-3bed865c35d8eb920ba5a68276fdf1690c834a64.tar.bz2 |
Make sure that setRecord emits dataChanged() with OnManualSubmit.
Since the change is immediately visible through data(), this is needed
so that QSortFilterProxyModel etc work correctly.
Change-Id: Ied7afce2e6a1f516b502d3501f9d214df54e52f2
Task-number: QTBUG-14831
Reviewed-by: Charles Yin
Diffstat (limited to 'src/sql/models')
-rw-r--r-- | src/sql/models/qsqltablemodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 6f9c284..61cd1d3 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -1338,6 +1338,9 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record) else mrow.rec.setValue(idx, record.value(i)); } + + if (isOk) + emit dataChanged(createIndex(row, 0), createIndex(row, columnCount() - 1)); return isOk; } } return false; |