diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-08-29 09:34:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-30 13:51:22 +0200 |
commit | c194b7f3454f470d24be729ef660c5cfe7a9b841 (patch) | |
tree | 467b19df91b6a463ea8064c5e92a0bf07189500b /INSTALL | |
parent | 98c663acd955ed7f0afcaffc50e738690fbb94ae (diff) |
QSqlQueryModel: fix nested beginResetModel/endResetModel
Follow-up to 83c9ebbd6692cde99ee692e6549c591100f12545.
Consider the case where calls to the reset methods on the same object
are nested as in the following sequence:
1. beginResetModel()
2. beginResetModel()
3. endResetModel()
4. endResetModel()
In such cases, only the outermost calls, i.e., 1) and 4), should emit
signals.
After 83c9ebbd6692cde99ee692e6549c591100f12545, 1) and 3) emitted the
signals, which is wrong. This is corrected by keeping track of the
nesting level.
Such sequences can come about when a base class calls the begin/end
methods between the calls made by the subclass.
QSqlTableModel::select() is an example of this.
Test included.
Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions