QSqlTableModel: deduplicate and optimize counting of inserts
authorMark Brand <mabrand@mabrand.nl>
Thu, 9 Feb 2012 14:33:43 +0000 (15:33 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 15 Feb 2012 01:36:17 +0000 (02:36 +0100)
commit76418628f14ff555242d7819e6cbcc6191c44360
treeaf1c1e54fab660726c8a58b71cca63f861ce30bc
parent2ecdb8c091cbfdc2b4f81c90828fb61b96c565fe
QSqlTableModel: deduplicate and optimize counting of inserts

Reading STL iteration code is painful enough if you only have
to do it once.
Thiago suggested remembering the end iterator for performance.

Change-Id: Ic2cdc480f591932ea420e692a4d2796d49f05313
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
src/sql/models/qsqltablemodel.cpp
src/sql/models/qsqltablemodel_p.h