qt5base-lts/tests/auto/sql
Marc Mutz add95c5510 tst_QSqlQuery: fix UBs (invalid downcasts, member calls)
The existing code derived a helper class from QSqlResult and
overloaded two protected functions as public ones so the test
could call them after casting QSqlResults to that helper class.

Both the cast (which is a C-style cast, but with combined
static_cast and const_cast semanics) and the following member
function call are undefined behavior.

Fix by making the test class a friend of QSqlResult, and
dropping the casts.

Change-Id: I09de2e2b46976d01cfce25892aec6ad36881d3eb
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-03-15 10:39:20 +00:00
..
kernel tst_QSqlQuery: fix UBs (invalid downcasts, member calls) 2016-03-15 10:39:20 +00:00
models QSqlDriver: use table prefix in WHERE clauses 2016-02-17 23:13:58 +00:00
sql.pro Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00