refactor QSqlTableModel::setRecord()
authorMark Brand <mabrand@mabrand.nl>
Wed, 6 Jul 2011 19:10:45 +0000 (21:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sun, 5 Feb 2012 16:50:30 +0000 (17:50 +0100)
commit11bd543d901f67f79db3f5b5dfaa626c6e8faa45
tree65d3d15a33d332b397f418391450c69b8775615f
parentccaa6734f124e9afc86c29e93b77b38ffc54254b
refactor QSqlTableModel::setRecord()

-Do not use setData()
We're using ModifiedRow now so it makes sense to buffer the changes
and submit the row at once. This improves readability and
encourages further haromonization of the editing strategies.

-No longer need temporary change to OnRowChange
Previously, the strategy was temporarily changed from OnFieldChange
to OnRowChange in order to obtain the desired behavior from setData().
Now, since we don't use setData(), we can program the desired behavior
here and don't need this trick.

-Comment historical idiosyncracies/bugs

Change-Id: I6d9e2a69e1571a74c630ad1392e15b60fc0ad3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
src/sql/models/qsqltablemodel.cpp