qt5base-lts/tests/auto
Mark Brand 5fe272f68a QSqlTableModel: fix segfault when overriding selectRow()
The STL-style iteration over the cache in submitAll() assumed the
iterator would remain valid until reaching cache.end(). This failed
to consider that virtual selectRow() might be overridden so that
it removes rows from the cache. For example, it might call select()
which would empty the cache.

The new approach checks at each iteration whether the row is
still in the cache. Using foreach here is justified by its fitness
for purpose and readability.

New test included.

Change-Id: Idee8807ede239c3ba56ff1604574c49f47385ad2
Reviewed-by: David Faure (fixes for KDE) <faure@kde.org>
2012-10-05 03:16:12 +02:00
..
cmake CMake: Improve QT5_GET_MOC_FLAGS macro 2012-10-04 11:58:48 +02:00
compilerwarnings/data Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
concurrent Include qexception.h instead of qtconcurrentexception.h 2012-09-28 23:50:10 +02:00
corelib tst_QLocale: remove QSKIP, wrap Q_OS_MAC/Q_OS_WIN 2012-10-04 09:09:15 +02:00
dbus Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
gui Test: Enable tst_QWMatrix::operator_star_qwmatrix 2012-09-27 21:13:52 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_data 2012-10-02 08:06:11 +02:00
opengl Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
other Fix #if 0 usage in collections autotest. 2012-10-04 03:03:17 +02:00
printsupport QtPrintSupport: allow slight deviations from pre-defined paper sizes in tests 2012-09-26 10:08:59 +02:00
shared Auto tests: add PlatformClipboard::isAvailable() 2012-09-27 06:07:13 +02:00
sql QSqlTableModel: fix segfault when overriding selectRow() 2012-10-05 03:16:12 +02:00
testlib Make QUrl::errorString() usable for QtTest output in invalid URLs 2012-10-02 22:34:42 +02:00
tools Fix moc stumbling over gcc __attribute__ extensions 2012-10-01 14:27:14 +02:00
widgets test: Remove QSKIP from tst_QToolButton::triggered() 2012-10-04 12:55:23 +02:00
xml Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
auto.pro Test: Redo remove QSKIP from printsupport tests 2012-09-13 19:33:08 +02:00
network-settings.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
platformquirks.h Auto tests: remove PlatformQuirks::isAutoMaximizing() 2012-09-26 10:08:59 +02:00
test.pl Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00