summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel
diff options
context:
space:
mode:
authorThiago A. Correa <thiago.correa@gmail.com>2012-10-03 22:52:59 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-08 08:55:28 +0200
commit7e6e1412348fb8d8df844d821ee80d6d3de69517 (patch)
tree4c90539cd4de03da3f7fc9283ae1a852bcc2c7c9 /tests/auto/sql/kernel
parent179437bdbad3fa2f27ea7fc3a4284a844cb30792 (diff)
QSqlQuery::value string overload
Introduce value overload to take field name as a parameter. This allows for terser application code that avoids explicit calls to QSqlRecord::value(). Change-Id: I02b6712cd5ec41633b902714315b5716c17d1a9b Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'tests/auto/sql/kernel')
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index 2030e2c4bf..26768f21ed 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -903,6 +903,7 @@ void tst_QSqlQuery::value()
while ( q.next() ) {
QCOMPARE( q.value( 0 ).toInt(), i );
+ QCOMPARE( q.value( "id" ).toInt(), i );
if ( db.driverName().startsWith( "QIBASE" ) )
QVERIFY( q.value( 1 ).toString().startsWith( "VarChar" + QString::number( i ) ) );