qt5base-lts/tests/auto/sql/kernel
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
..
qsql fix usage of wince scope 2015-06-05 10:29:10 +00:00
qsqldatabase Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-29 11:13:41 +01:00
qsqldriver fix usage of wince scope 2015-06-05 10:29:10 +00:00
qsqlerror tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-29 11:35:53 +00:00
qsqlfield Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlquery tst_QSqlQuery: fix UBs (invalid downcasts, member calls) 2016-03-15 10:39:20 +00:00
qsqlrecord Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlresult Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlthread fix usage of wince scope 2015-06-05 10:29:10 +00:00
kernel.pro