QSqlTableModel::indexInQuery: fix inserted row accounting
authorMark Brand <mabrand@mabrand.nl>
Wed, 7 Mar 2012 23:19:03 +0000 (00:19 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Mar 2012 12:14:05 +0000 (13:14 +0100)
commitcdc9422c2e8b3ebb711085c0813b4477863ec01f
tree8414d6ca9293dc130e4397928c528c8b8e9cb710
parent4c0de07a0e555c52680c5a45aef0121721f242ea
QSqlTableModel::indexInQuery: fix inserted row accounting

Commit b979956ec46093e5668c2b264f9b68da3cbb0326 introduced a
distinction between rows that have a pending INSERT operation and
rows that have already been inserted in the database but still are
in the change cache. Both cases are rows that are not in the underlying
query. Unfortunately, we overlooked a case where the point of the test
is whether the row is in the query.

Change-Id: I0f58bed232d9336fed6e67c3d140fd580ec35868
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
src/sql/models/qsqltablemodel.cpp