From 109bf980b37fed405c6c1eb14cb9c83ff897e389 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Sat, 21 Sep 2013 15:23:16 +0900 Subject: Fix a bug in QSqlQuery::isNull documentation the method returns true if there is not such field. Change-Id: I25db8de4561d3e0604f3e64edc1810140ba4aad2 Reviewed-by: Andy Shaw Reviewed-by: Mark Brand --- tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index 1a100ce706..9098d5b101 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -1393,6 +1393,9 @@ void tst_QSqlQuery::isNull() QVERIFY( q.next() ); QVERIFY( !q.isNull( 0 ) ); QVERIFY( !q.isNull( 1 ) ); + + // For a non existent field, it should be returning true. + QVERIFY(q.isNull(2)); } /*! TDS specific BIT field test */ -- cgit v1.2.3