QSqlRelationalTableModelPrivate: simplify field name translation
authorMark Brand <mabrand@mabrand.nl>
Mon, 13 Feb 2012 08:26:21 +0000 (09:26 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 15 Feb 2012 01:36:38 +0000 (02:36 +0100)
commit76fa96b99e9ee79d0a2016fb28f17bc2dc58ab0a
treefa105b124cd08e5c09f8c71fdbed2e4637bdbf29
parent7bced2878047840bb9bca58289fa1aa4119f034a
QSqlRelationalTableModelPrivate: simplify field name translation

It's not appropriate to use indexInQuery() here. First of all,
the row might be an inserted row, and thus not be in the query.
The intent was probably to get the column position in the query,
but this is certainly not row dependent. Furthermore, if there
are inserted or removed columns, these are managed within
QSqlQueryModel.

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