qt5base-lts/tests/auto/sql
Mark Brand 5953304bc5 QSqlTableModel::setRecord(): do not try to detect value changes
In an apparent attempt to be economical with emitting dataChanged()
and submitting SQL to the databse, setRecord() compares each field
value of the record with the old value, taking action only when
a difference is detected.  Several complaints against this code are:

-The comparision does not work on float type.

-It is really up to the application and database to decide this. The
model should make few assumptions. The application has the option to
omit fields from the record that should be ignored.

-The current behavior seems to assume that the "old" values are the
current state of the database, but the database may have changed since
the model was last refreshed.

-The code compares the value from record(), which probably
corresponds to the EditRole, with the DisplayRole value from data().

Change-Id: I11477c185eb411d442144dc682893d0df12d03d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-08 14:43:18 +01:00
..
kernel Handle the 'real' datatype correctly in the SQLite driver 2012-02-03 15:09:03 +01:00
models QSqlTableModel::setRecord(): do not try to detect value changes 2012-02-08 14:43:18 +01:00
sql.pro Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00