Go to file
Mark Brand c194b7f345 QSqlQueryModel: fix nested beginResetModel/endResetModel
Follow-up to 83c9ebbd66.

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 83c9ebbd66, 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>
2012-08-30 13:51:22 +02:00
bin de-duplicate code 2012-08-28 20:47:11 +02:00
config.tests QNX: Enable pre-compiled header support for QNX 2012-08-27 10:52:20 +02:00
dist dist/changes-5.0.0: note that QtConcurrent is a separate library these days 2012-08-30 02:29:02 +02:00
doc Added OpenGL example and documentation. 2012-08-29 16:53:00 +02:00
examples Added OpenGL example and documentation. 2012-08-29 16:53:00 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Temporarily mark ctest testcases as insignificant on Windows 2012-08-30 05:45:55 +02:00
qmake beautify string operations 2012-08-28 20:48:13 +02:00
src QSqlQueryModel: fix nested beginResetModel/endResetModel 2012-08-30 13:51:22 +02:00
tests QSqlQueryModel: fix nested beginResetModel/endResetModel 2012-08-30 13:51:22 +02:00
tools Fix bug in configure where Qt did not compile with QT_ICONV=no 2012-08-23 02:55:17 +02:00
util QUnicodeTables: some internal API renamings 2012-06-22 09:47:59 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Updated .gitignore 2012-08-18 13:59:11 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure filter standard paths from mysql_config & pg_config 2012-08-25 17:03:17 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Install right version of tools when x-compiling. 2012-07-17 12:52:48 +02:00
sync.profile Revert "Move QWindowSystemInterface out of qpa." 2012-08-03 00:38:09 +02:00