QSqlTableModel: use selectRow() for field and row edit strategies
authorMark Brand <mabrand@mabrand.nl>
Tue, 21 Feb 2012 08:22:26 +0000 (09:22 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 6 Mar 2012 23:01:32 +0000 (00:01 +0100)
commit888fed8065f708baeb6efa5f280c2f1aec3dee78
tree6d90aecef3b489d9cf4ad1d2880b173cbe749c44
parent291e2c7d5416af4d16dc0a6e60df7980ba745a3d
QSqlTableModel: use selectRow() for field and row edit strategies

Calling select refreshes the query data but disrupts view
navigation.

For OnFieldChange and OnRecordChange it makes sense to only
select the row in question. This does not disturb view navigation.

Assume disruption of view navigation is not a problem
for OnManualSubmit because the user or application decides
when submitAll is called.

Task-number: QTBUG-2875
Change-Id: I1e5f68668fb9102f6296d67d543e80daa403f1c4
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
dist/changes-5.0.0
src/sql/models/qsqltablemodel.cpp
tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp