summaryrefslogtreecommitdiffstats
path: root/src/sql/models
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-05-24 16:27:08 +0200
committerLiang Qi <liang.qi@qt.io>2018-05-24 16:29:14 +0200
commitf82e5085169876e0ec7c1b744d021b068c281cfe (patch)
treea870e1f68ce62818a0793c4c78a67971e841e676 /src/sql/models
parentf74d4fb1dacc682e2e6f4a44e4240f642a2c3b70 (diff)
parentee47999333dde1d38b73d04e142e05f06f8c56ed (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
Diffstat (limited to 'src/sql/models')
-rw-r--r--src/sql/models/qsqltablemodel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 05feb87466..865f76c73a 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1368,12 +1368,12 @@ QSqlRecord QSqlTableModel::record(int row) const
target fields are mapped by field name, not by position in
the record.
- Note that the generated flags in \a values are preserved
- and determine whether the corresponding fields are used when
- changes are submitted to the database. The caller should
- remember to set the generated flag to FALSE for fields
- where the database is meant to supply the value, such as an
- automatically incremented ID.
+ Note that the generated flags in \a values are preserved to
+ determine whether the corresponding fields are used when changes
+ are submitted to the database. By default, it is set to \c true
+ for all fields in a QSqlRecord. You must set the flag to \c false
+ using \l{QSqlRecord::}{setGenerated}(false) for any value in
+ \a values, to save changes back to the database.
For edit strategies OnFieldChange and OnRowChange, a row may
receive a change only if no other row has a cached change.