qt5base-lts/tests/auto/sql/models
Mark Brand 555aa4439b QSqlTableModel::commitAll(): replace row removal hack
The purpose of the hack was to fool QSqlQueryModel into signaling the
removal of extra rows via rowsRemoved(). The extra rows are the
inserted rows generated by QSqlTableModel.

While it is important to signal the removal of all the rows before
requerying after committing changes, there is a cleaner way. The
table model should remove its rows before the query model removes its
rows.

Iterating backwards avoids having to decrement row numbers above ones
being removed.

Expected test results have been adjusted for these changes.

Change-Id: I0e8aa81f5e7b8fea5922f5ffd1cfb4a932313a10
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-15 02:36:21 +01:00
..
qsqlquerymodel Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqlrelationaltablemodel Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqltablemodel QSqlTableModel::commitAll(): replace row removal hack 2012-02-15 02:36:21 +01:00
models.pro Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00