Return true for QSqlQuery::isNull on non-existent fields.
This fixes the tst_QSqlQuery::isNull test case when run against a MySQL database driver. Change-Id: I8248ba956472bae97a64247594055e6f02840557 Reviewed-by: Mark Brand <mabrand@mabrand.nl>bb10
parent
2302d386c7
commit
2f2382ee1d
|
|
@ -670,6 +670,8 @@ QVariant QMYSQLResult::data(int field)
|
|||
|
||||
bool QMYSQLResult::isNull(int field)
|
||||
{
|
||||
if (field < 0 || field >= d->fields.count())
|
||||
return true;
|
||||
if (d->preparedQuery)
|
||||
return d->fields.at(field).nullIndicator;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue