diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-08-29 10:14:08 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-30 13:51:22 +0200 |
commit | a3963d8bbcf7b4916c0e7c983cf32f95bf727e8c (patch) | |
tree | 4e63a8197653dc343305a4d14f3e2c70ac038185 /src/sql/models/qsqlquerymodel.h | |
parent | c194b7f3454f470d24be729ef660c5cfe7a9b841 (diff) |
QSqlQueryModel: suppress insert and remove signals while resetting
There is no need to emit signals for inserting and removing rows
and columns while resetting the model. Suppress these signals in
such a way that subclasses can benefit without worrying about it.
Change-Id: I04447c87173be54a7323b97608cdd40ae245b80b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/sql/models/qsqlquerymodel.h')
-rw-r--r-- | src/sql/models/qsqlquerymodel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h index 89b72c8222..fd9ec53155 100644 --- a/src/sql/models/qsqlquerymodel.h +++ b/src/sql/models/qsqlquerymodel.h @@ -90,6 +90,18 @@ public: bool canFetchMore(const QModelIndex &parent = QModelIndex()) const; protected: + void beginInsertRows(const QModelIndex &parent, int first, int last); + void endInsertRows(); + + void beginRemoveRows(const QModelIndex &parent, int first, int last); + void endRemoveRows(); + + void beginInsertColumns(const QModelIndex &parent, int first, int last); + void endInsertColumns(); + + void beginRemoveColumns(const QModelIndex &parent, int first, int last); + void endRemoveColumns(); + void beginResetModel(); void endResetModel(); virtual void queryChange(); |