qt5base-lts/tests/auto
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
..
cmake Don't attempt to test DBus on QNX. 2012-08-28 21:17:48 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
corelib Make tests/auto/corelib compile on Windows CE 2012-08-30 06:22:34 +02:00
dbus Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
gui Made QImage::fill(uint pixel) for RGB888 accept QRgb values. 2012-08-29 16:53:00 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network Add support for explicit TLS 1.1 and 1.2 2012-08-29 14:22:54 +02:00
opengl Remove some dead code wrapped in Q_WS_QWS. 2012-08-03 11:24:28 +02:00
other Fix some warnings in tests. 2012-08-28 17:07:15 +02:00
printsupport Ensure that printer orientation is preserved 2012-08-30 08:54:59 +02:00
shared Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00
sql QSqlQueryModel: fix nested beginResetModel/endResetModel 2012-08-30 13:51:22 +02:00
testlib Make QSignalSpy copy QVariant parameters directly 2012-08-07 11:15:55 +02:00
tools Add automatic metatype registration for invokable methods. 2012-08-28 18:30:39 +02:00
widgets Fixed the QTreeView expansion/collpasing when animated 2012-08-29 20:40:17 +02:00
xml Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
auto.pro tests: fixed check for QtOpenGL 2012-07-30 06:06:12 +02:00
network-settings.h Fix auto tests build with gcc 4.7 2012-05-23 00:42:20 +02:00
platformquirks.h Remove #ifdef Q_WS_ / include / #endif conditionals. 2012-07-16 16:30:55 +02:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00