summaryrefslogtreecommitdiffstats
path: root/src/sql/models/qsqltablemodel_p.h
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-02-09 15:33:43 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-15 02:36:17 +0100
commit76418628f14ff555242d7819e6cbcc6191c44360 (patch)
treeaf1c1e54fab660726c8a58b71cca63f861ce30bc /src/sql/models/qsqltablemodel_p.h
parent2ecdb8c091cbfdc2b4f81c90828fb61b96c565fe (diff)
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>
Diffstat (limited to 'src/sql/models/qsqltablemodel_p.h')
-rw-r--r--src/sql/models/qsqltablemodel_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index 8649a91e53..c2e4442a6b 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -79,6 +79,7 @@ public:
virtual void revertCachedRow(int row);
virtual int nameToIndex(const QString &name) const;
QString strippedFieldName(const QString &name) const;
+ int insertCount(int maxRow = -1) const;
void initRecordAndPrimaryIndex();
QSqlDatabase db;