diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-17 13:43:30 +1000 |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-18 16:09:29 +1000 |
commit | 49babe02f0a00fe2baff3950fbdcb725ce20d772 (patch) | |
tree | e0383c879f78ef74ba7a0fe394504c096312edf4 /tests/auto/qsql/tst_qsql.cpp | |
parent | 0cd93933d8e5cc69151958fc285936854ff86e47 (diff) |
Remove autotest code for Qt3Support library.
This commit deals with the simple cases -- mostly just removing blocks
of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with
the trickier cases.
Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qsql/tst_qsql.cpp')
-rw-r--r-- | tests/auto/qsql/tst_qsql.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/auto/qsql/tst_qsql.cpp b/tests/auto/qsql/tst_qsql.cpp index c34f94cf43..fe8af9dd9c 100644 --- a/tests/auto/qsql/tst_qsql.cpp +++ b/tests/auto/qsql/tst_qsql.cpp @@ -45,9 +45,6 @@ #include <qsqldatabase.h> #include <qsqlerror.h> #include <qsqlquery.h> -#ifdef QT3_SUPPORT -#include <q3sqlcursor.h> -#endif #include <qsqlrecord.h> #include <qsql.h> #include <qsqlresult.h> @@ -149,47 +146,6 @@ void tst_QSql::basicDriverTest() QCOMPARE( rInf.count(), 2 ); QCOMPARE( rInf.fieldName( 0 ).toLower(), QString( "id" ) ); QCOMPARE( rInf.fieldName( 1 ).toLower(), QString( "name" ) ); - -#ifdef QT3_SUPPORT - QSqlRecord* rec = 0; - Q3SqlCursor cur( tableName, true, db ); - QVERIFY_SQL( cur, select() ); - QCOMPARE( cur.count(), 2 ); - QCOMPARE( cur.fieldName( 0 ).lower(), QString( "id" ) ); - QCOMPARE( cur.fieldName( 1 ).lower(), QString( "name" ) ); - - rec = cur.primeDelete(); - rec->setGenerated( 0, false ); - rec->setGenerated( 1, false ); - QVERIFY_SQL( cur, del() ); - QVERIFY_SQL( cur, select() ); - QCOMPARE( cur.at(), int( QSql::BeforeFirst ) ); - QVERIFY( !cur.next() ); - rec = cur.primeInsert(); - rec->setValue( 0, 1 ); - rec->setValue( 1, QString( "Harry" ) ); - QVERIFY_SQL( cur, insert( false ) ); - rec = cur.primeInsert(); - rec->setValue( 0, 2 ); - rec->setValue( 1, QString( "Trond" ) ); - QVERIFY_SQL( cur, insert( true ) ); - QVERIFY_SQL( cur, select( cur.index( QString( "id" ) ) ) ); - QVERIFY_SQL( cur, next() ); - QCOMPARE( cur.value( 0 ).toInt(), 1 ); - QCOMPARE( cur.value( 1 ).toString().stripWhiteSpace(), QString( "Harry" ) ); - QVERIFY_SQL( cur, next() ); - QCOMPARE( cur.value( 0 ).toInt(), 2 ); - QCOMPARE( cur.value( 1 ).toString().stripWhiteSpace(), QString( "Trond" ) ); - QVERIFY( !cur.next() ); - QVERIFY_SQL( cur, first() ); - rec = cur.primeUpdate(); - rec->setValue( 1, QString( "Vohi" ) ); - QVERIFY_SQL( cur, update( true ) ); - QVERIFY_SQL( cur, select( "id = 1" ) ); - QVERIFY_SQL( cur, next() ); - QCOMPARE( cur.value( 0 ).toInt(), 1 ); - QCOMPARE( cur.value( 1 ).toString().stripWhiteSpace(), QString( "Vohi" ) ); -#endif } dbs.close(); |