qt5base-lts/tests/auto/sql/models/qsqltablemodel
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
..
.gitignore Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00
qsqltablemodel.pro all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
tst_qsqltablemodel.cpp QSqlTableModel::commitAll(): replace row removal hack 2012-02-15 02:36:21 +01:00