diff options
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 292 |
1 files changed, 146 insertions, 146 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index e412b6f3ed..4e6664faa0 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -220,7 +220,7 @@ static const int ITERATION_COUNT = 2; //helper class for database specific tests struct FieldDef { FieldDef(QString tn = QString(), - QVariant::Type t = QVariant::Invalid, + int t = QMetaType::UnknownType, QVariant v = QVariant(), bool nl = true): typeName(tn), type(t), val(v), nullable(nl) {} @@ -237,7 +237,7 @@ struct FieldDef { return "t_" + rt.left(i); } QString typeName; - QVariant::Type type; + int type; QVariant val; bool nullable; }; @@ -656,8 +656,8 @@ void tst_QSqlDatabase::record() CHECK_DATABASE(db); static const FieldDef fieldDefs[] = { - FieldDef("char(20)", QMetaType(QMetaType::String), QString("blah1"), false), - FieldDef("varchar(20)", QMetaType(QMetaType::String), QString("blah2"), false), + FieldDef("char(20)", QMetaType(QMetaType::QString), QString("blah1"), false), + FieldDef("varchar(20)", QMetaType(QMetaType::QString), QString("blah2"), false), FieldDef() }; @@ -675,7 +675,7 @@ void tst_QSqlDatabase::testRecord(const FieldDef fieldDefs[], const QSqlRecord& QVERIFY2(inf.field(i).isAutoValue(), qPrintable(inf.field(i).name() + " should be reporting as an autovalue")); for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) { QCOMPARE(inf.field(i+1).name().toUpper(), fieldDefs[ i ].fieldName().toUpper()); - if (inf.field(i+1).metaType().id() != int(fieldDefs[ i ].type)) { + if (inf.field(i+1).metaType().id() != fieldDefs[ i ].type) { QFAIL(qPrintable(QString(" Expected: '%1' Received: '%2' for field %3 in testRecord").arg( QMetaType(fieldDefs[ i ].type).name()).arg( inf.field(i+1).metaType().name()).arg( @@ -713,26 +713,26 @@ void tst_QSqlDatabase::recordTDS() CHECK_DATABASE(db); static const FieldDef fieldDefs[] = { - FieldDef("tinyint", QVariant::Int, 255), - FieldDef("smallint", QVariant::Int, 32767), - FieldDef("int", QVariant::Int, 2147483647), - FieldDef("numeric(10,9)", QVariant::Double, 1.23456789), - FieldDef("decimal(10,9)", QVariant::Double, 1.23456789), - FieldDef("float(4)", QVariant::Double, 1.23456789), - FieldDef("double precision", QVariant::Double, 1.23456789), - FieldDef("real", QVariant::Double, 1.23456789), - FieldDef("smallmoney", QVariant::Double, 100.42), - FieldDef("money", QVariant::Double, 200.42), + FieldDef("tinyint", QMetaType::Int, 255), + FieldDef("smallint", QMetaType::Int, 32767), + FieldDef("int", QMetaType::Int, 2147483647), + FieldDef("numeric(10,9)", QMetaType::Double, 1.23456789), + FieldDef("decimal(10,9)", QMetaType::Double, 1.23456789), + FieldDef("float(4)", QMetaType::Double, 1.23456789), + FieldDef("double precision", QMetaType::Double, 1.23456789), + FieldDef("real", QMetaType::Double, 1.23456789), + FieldDef("smallmoney", QMetaType::Double, 100.42), + FieldDef("money", QMetaType::Double, 200.42), // accuracy is that of a minute - FieldDef("smalldatetime", QVariant::DateTime, QDateTime(QDate::currentDate(), QTime(1, 2, 0, 0))), + FieldDef("smalldatetime", QMetaType::QDateTime, QDateTime(QDate::currentDate(), QTime(1, 2, 0, 0))), // accuracy is that of a second - FieldDef("datetime", QVariant::DateTime, QDateTime(QDate::currentDate(), QTime(1, 2, 3, 0))), - FieldDef("char(20)", QVariant::String, "blah1"), - FieldDef("varchar(20)", QVariant::String, "blah2"), - FieldDef("nchar(20)", QVariant::String, "blah3"), - FieldDef("nvarchar(20)", QVariant::String, "blah4"), - FieldDef("text", QVariant::String, "blah5"), - FieldDef("bit", QVariant::Int, 1, false), + FieldDef("datetime", QMetaType::QDateTime, QDateTime(QDate::currentDate(), QTime(1, 2, 3, 0))), + FieldDef("char(20)", QMetaType::QString, "blah1"), + FieldDef("varchar(20)", QMetaType::QString, "blah2"), + FieldDef("nchar(20)", QMetaType::QString, "blah3"), + FieldDef("nvarchar(20)", QMetaType::QString, "blah4"), + FieldDef("text", QMetaType::QString, "blah5"), + FieldDef("bit", QMetaType::Int, 1, false), FieldDef() }; @@ -764,26 +764,26 @@ void tst_QSqlDatabase::recordOCI() static const QDateTime dt(QDate::currentDate(), QTime(1, 2, 3, 0)); if (hasTimeStamp) { - tsdef = FieldDef("timestamp", QVariant::DateTime, dt); - tstzdef = FieldDef("timestamp with time zone", QVariant::DateTime, dt); - tsltzdef = FieldDef("timestamp with local time zone", QVariant::DateTime, dt); - intytm = FieldDef("interval year to month", QVariant::String, QString("+01-01")); - intdts = FieldDef("interval day to second", QVariant::String, QString("+01 00:00:01.000000")); + tsdef = FieldDef("timestamp", QMetaType::QDateTime, dt); + tstzdef = FieldDef("timestamp with time zone", QMetaType::QDateTime, dt); + tsltzdef = FieldDef("timestamp with local time zone", QMetaType::QDateTime, dt); + intytm = FieldDef("interval year to month", QMetaType::QString, QString("+01-01")); + intdts = FieldDef("interval day to second", QMetaType::QString, QString("+01 00:00:01.000000")); } const FieldDef fieldDefs[] = { - FieldDef("char(20)", QVariant::String, QString("blah1")), - FieldDef("varchar(20)", QVariant::String, QString("blah2")), - FieldDef("nchar(20)", QVariant::String, QString("blah3")), - FieldDef("nvarchar2(20)", QVariant::String, QString("blah4")), - FieldDef("number(10,5)", QVariant::Double, 1.1234567), - FieldDef("date", QVariant::DateTime, dt), - FieldDef("long raw", QVariant::ByteArray, QByteArray("blah5")), - FieldDef("raw(2000)", QVariant::ByteArray, QByteArray("blah6"), false), - FieldDef("blob", QVariant::ByteArray, QByteArray("blah7")), - FieldDef("clob", QVariant::ByteArray, QByteArray("blah8")), - FieldDef("nclob", QVariant::ByteArray, QByteArray("blah9")), -// FieldDef("bfile", QVariant::ByteArray, QByteArray("blah10")), + FieldDef("char(20)", QMetaType::QString, QString("blah1")), + FieldDef("varchar(20)", QMetaType::QString, QString("blah2")), + FieldDef("nchar(20)", QMetaType::QString, QString("blah3")), + FieldDef("nvarchar2(20)", QMetaType::QString, QString("blah4")), + FieldDef("number(10,5)", QMetaType::Double, 1.1234567), + FieldDef("date", QMetaType::QDateTime, dt), + FieldDef("long raw", QMetaType::QByteArray, QByteArray("blah5")), + FieldDef("raw(2000)", QMetaType::QByteArray, QByteArray("blah6"), false), + FieldDef("blob", QMetaType::QByteArray, QByteArray("blah7")), + FieldDef("clob", QMetaType::QByteArray, QByteArray("blah8")), + FieldDef("nclob", QMetaType::QByteArray, QByteArray("blah9")), +// FieldDef("bfile", QMetaType::QByteArray, QByteArray("blah10")), intytm, intdts, @@ -819,39 +819,39 @@ void tst_QSqlDatabase::recordPSQL() FieldDef byteadef; if (db.driver()->hasFeature(QSqlDriver::BLOB)) - byteadef = FieldDef("bytea", QVariant::ByteArray, QByteArray("bl\\ah")); + byteadef = FieldDef("bytea", QMetaType::QByteArray, QByteArray("bl\\ah")); static FieldDef fieldDefs[] = { - FieldDef("bigint", QVariant::LongLong, Q_INT64_C(9223372036854775807)), - FieldDef("bigserial", QVariant::LongLong, 100, false), - FieldDef("bit", QVariant::String, "1"), // a bit in postgres is a bit-string - FieldDef("box", QVariant::String, "(5,6),(1,2)"), - FieldDef("char(20)", QVariant::String, "blah5678901234567890"), - FieldDef("varchar(20)", QVariant::String, "blah5678901234567890"), - FieldDef("cidr", QVariant::String, "12.123.0.0/24"), - FieldDef("circle", QVariant::String, "<(1,2),3>"), - FieldDef("date", QVariant::Date, QDate::currentDate()), - FieldDef("float8", QVariant::Double, 1.12345678912), - FieldDef("inet", QVariant::String, "12.123.12.23"), - FieldDef("integer", QVariant::Int, 2147483647), - FieldDef("interval", QVariant::String, "1 day 12:59:10"), + FieldDef("bigint", QMetaType::LongLong, Q_INT64_C(9223372036854775807)), + FieldDef("bigserial", QMetaType::LongLong, 100, false), + FieldDef("bit", QMetaType::QString, "1"), // a bit in postgres is a bit-string + FieldDef("box", QMetaType::QString, "(5,6),(1,2)"), + FieldDef("char(20)", QMetaType::QString, "blah5678901234567890"), + FieldDef("varchar(20)", QMetaType::QString, "blah5678901234567890"), + FieldDef("cidr", QMetaType::QString, "12.123.0.0/24"), + FieldDef("circle", QMetaType::QString, "<(1,2),3>"), + FieldDef("date", QMetaType::QDate, QDate::currentDate()), + FieldDef("float8", QMetaType::Double, 1.12345678912), + FieldDef("inet", QMetaType::QString, "12.123.12.23"), + FieldDef("integer", QMetaType::Int, 2147483647), + FieldDef("interval", QMetaType::QString, "1 day 12:59:10"), // LOL... you can create a "line" datatype in PostgreSQL <= 7.2.x but // as soon as you want to insert data you get a "not implemented yet" error -// FieldDef("line", QVariant::Polygon, QPolygon(QRect(1, 2, 3, 4))), - FieldDef("lseg", QVariant::String, "[(1,1),(2,2)]"), - FieldDef("macaddr", QVariant::String, "08:00:2b:01:02:03"), - FieldDef("money", QVariant::String, "$12.23"), - FieldDef("numeric", QVariant::Double, 1.2345678912), - FieldDef("path", QVariant::String, "((1,2),(3,2),(3,5),(1,5))"), - FieldDef("point", QVariant::String, "(1,2)"), - FieldDef("polygon", QVariant::String, "((1,2),(3,2),(3,5),(1,5))"), - FieldDef("real", QVariant::Double, 1.1234), - FieldDef("smallint", QVariant::Int, 32767), - FieldDef("serial", QVariant::Int, 100, false), - FieldDef("text", QVariant::String, "blah"), - FieldDef("time(6)", QVariant::Time, QTime(1, 2, 3)), - FieldDef("timetz", QVariant::Time, QTime(1, 2, 3)), - FieldDef("timestamp(6)", QVariant::DateTime, QDateTime::currentDateTime()), - FieldDef("timestamptz", QVariant::DateTime, QDateTime::currentDateTime()), +// FieldDef("line", QMetaType::Polygon, QPolygon(QRect(1, 2, 3, 4))), + FieldDef("lseg", QMetaType::QString, "[(1,1),(2,2)]"), + FieldDef("macaddr", QMetaType::QString, "08:00:2b:01:02:03"), + FieldDef("money", QMetaType::QString, "$12.23"), + FieldDef("numeric", QMetaType::Double, 1.2345678912), + FieldDef("path", QMetaType::QString, "((1,2),(3,2),(3,5),(1,5))"), + FieldDef("point", QMetaType::QString, "(1,2)"), + FieldDef("polygon", QMetaType::QString, "((1,2),(3,2),(3,5),(1,5))"), + FieldDef("real", QMetaType::Double, 1.1234), + FieldDef("smallint", QMetaType::Int, 32767), + FieldDef("serial", QMetaType::Int, 100, false), + FieldDef("text", QMetaType::QString, "blah"), + FieldDef("time(6)", QMetaType::QTime, QTime(1, 2, 3)), + FieldDef("timetz", QMetaType::QTime, QTime(1, 2, 3)), + FieldDef("timestamp(6)", QMetaType::QDateTime, QDateTime::currentDateTime()), + FieldDef("timestamptz", QMetaType::QDateTime, QDateTime::currentDateTime()), byteadef, FieldDef() @@ -901,37 +901,37 @@ void tst_QSqlDatabase::recordMySQL() with space on insert, and trailing spaces are removed on select. */ if( vernum >= ((5 << 16) + 15) ) { - bin10 = FieldDef("binary(10)", QVariant::ByteArray, QString("123abc ")); - varbin10 = FieldDef("varbinary(10)", QVariant::ByteArray, QString("123abcv ")); + bin10 = FieldDef("binary(10)", QMetaType::QByteArray, QString("123abc ")); + varbin10 = FieldDef("varbinary(10)", QMetaType::QByteArray, QString("123abcv ")); } static QDateTime dt(QDate::currentDate(), QTime(1, 2, 3, 0)); static const FieldDef fieldDefs[] = { - FieldDef("tinyint", static_cast<QVariant::Type>(QMetaType::Char), 127), - FieldDef("tinyint unsigned", static_cast<QVariant::Type>(QMetaType::UChar), 255), - FieldDef("smallint", static_cast<QVariant::Type>(QMetaType::Short), 32767), - FieldDef("smallint unsigned", static_cast<QVariant::Type>(QMetaType::UShort), 65535), - FieldDef("mediumint", QVariant::Int, 8388607), - FieldDef("mediumint unsigned", QVariant::UInt, 16777215), - FieldDef("integer", QVariant::Int, 2147483647), - FieldDef("integer unsigned", QVariant::UInt, 4294967295u), - FieldDef("bigint", QVariant::LongLong, Q_INT64_C(9223372036854775807)), - FieldDef("bigint unsigned", QVariant::ULongLong, Q_UINT64_C(18446744073709551615)), - FieldDef("float", QVariant::Double, 1.12345), - FieldDef("double", QVariant::Double, 1.123456789), - FieldDef("decimal(10, 9)", QVariant::Double, 1.123456789), - FieldDef("numeric(5, 2)", QVariant::Double, 123.67), - FieldDef("date", QVariant::Date, QDate::currentDate()), - FieldDef("datetime", QVariant::DateTime, dt), - FieldDef("timestamp", QVariant::DateTime, dt, false), - FieldDef("time", QVariant::String, dt.time()), - FieldDef("year", QVariant::Int, 2003), - FieldDef("char(20)", QVariant::String, "Blah"), - FieldDef("varchar(20)", QVariant::String, "BlahBlah"), - FieldDef("tinytext", QVariant::String, QString("blah5")), - FieldDef("text", QVariant::String, QString("blah6")), - FieldDef("mediumtext", QVariant::String, QString("blah7")), - FieldDef("longtext", QVariant::String, QString("blah8")), + FieldDef("tinyint", QMetaType::Char, 127), + FieldDef("tinyint unsigned", QMetaType::UChar, 255), + FieldDef("smallint", QMetaType::Short, 32767), + FieldDef("smallint unsigned", QMetaType::UShort, 65535), + FieldDef("mediumint", QMetaType::Int, 8388607), + FieldDef("mediumint unsigned", QMetaType::UInt, 16777215), + FieldDef("integer", QMetaType::Int, 2147483647), + FieldDef("integer unsigned", QMetaType::UInt, 4294967295u), + FieldDef("bigint", QMetaType::LongLong, Q_INT64_C(9223372036854775807)), + FieldDef("bigint unsigned", QMetaType::ULongLong, Q_UINT64_C(18446744073709551615)), + FieldDef("float", QMetaType::Double, 1.12345), + FieldDef("double", QMetaType::Double, 1.123456789), + FieldDef("decimal(10, 9)", QMetaType::Double, 1.123456789), + FieldDef("numeric(5, 2)", QMetaType::Double, 123.67), + FieldDef("date", QMetaType::QDate, QDate::currentDate()), + FieldDef("datetime", QMetaType::QDateTime, dt), + FieldDef("timestamp", QMetaType::QDateTime, dt, false), + FieldDef("time", QMetaType::QString, dt.time()), + FieldDef("year", QMetaType::Int, 2003), + FieldDef("char(20)", QMetaType::QString, "Blah"), + FieldDef("varchar(20)", QMetaType::QString, "BlahBlah"), + FieldDef("tinytext", QMetaType::QString, QString("blah5")), + FieldDef("text", QMetaType::QString, QString("blah6")), + FieldDef("mediumtext", QMetaType::QString, QString("blah7")), + FieldDef("longtext", QMetaType::QString, QString("blah8")), // SET OF? FieldDef() @@ -955,26 +955,26 @@ void tst_QSqlDatabase::recordDB2() CHECK_DATABASE(db); static const FieldDef fieldDefs[] = { - FieldDef("char(20)", QVariant::String, QString("Blah1")), - FieldDef("varchar(20)", QVariant::String, QString("Blah2")), - FieldDef("long varchar", QVariant::String, QString("Blah3")), + FieldDef("char(20)", QMetaType::QString, QString("Blah1")), + FieldDef("varchar(20)", QMetaType::QString, QString("Blah2")), + FieldDef("long varchar", QMetaType::QString, QString("Blah3")), // using BOOLEAN results in "SQL0486N The BOOLEAN data type is currently only supported internally." -//X FieldDef("boolean" , QVariant::Bool, QVariant(true, 1)), - FieldDef("smallint", QVariant::Int, 32767), - FieldDef("integer", QVariant::Int, 2147483647), - FieldDef("bigint", QVariant::LongLong, Q_INT64_C(9223372036854775807)), - FieldDef("real", QVariant::Double, 1.12345), - FieldDef("double", QVariant::Double, 1.23456789), - FieldDef("float", QVariant::Double, 1.23456789), - FieldDef("decimal(10,9)", QVariant::Double, 1.234567891), - FieldDef("numeric(10,9)", QVariant::Double, 1.234567891), - FieldDef("date", QVariant::Date, QDate::currentDate()), - FieldDef("time", QVariant::Time, QTime(1, 2, 3)), - FieldDef("timestamp", QVariant::DateTime, QDateTime::currentDateTime()), -// FieldDef("graphic(20)", QVariant::String, QString("Blah4")), -// FieldDef("vargraphic(20)", QVariant::String, QString("Blah5")), -// FieldDef("long vargraphic", QVariant::String, QString("Blah6")), - //X FieldDef("datalink", QVariant::String, QString("DLVALUE('Blah10')")), +//X FieldDef("boolean" , QMetaType::Bool, QVariant(true, 1)), + FieldDef("smallint", QMetaType::Int, 32767), + FieldDef("integer", QMetaType::Int, 2147483647), + FieldDef("bigint", QMetaType::LongLong, Q_INT64_C(9223372036854775807)), + FieldDef("real", QMetaType::Double, 1.12345), + FieldDef("double", QMetaType::Double, 1.23456789), + FieldDef("float", QMetaType::Double, 1.23456789), + FieldDef("decimal(10,9)", QMetaType::Double, 1.234567891), + FieldDef("numeric(10,9)", QMetaType::Double, 1.234567891), + FieldDef("date", QMetaType::QDate, QDate::currentDate()), + FieldDef("time", QMetaType::QTime, QTime(1, 2, 3)), + FieldDef("timestamp", QMetaType::QDateTime, QDateTime::currentDateTime()), +// FieldDef("graphic(20)", QMetaType::QString, QString("Blah4")), +// FieldDef("vargraphic(20)", QMetaType::QString, QString("Blah5")), +// FieldDef("long vargraphic", QMetaType::QString, QString("Blah6")), + //X FieldDef("datalink", QMetaType::QString, QString("DLVALUE('Blah10')")), FieldDef() }; @@ -991,16 +991,16 @@ void tst_QSqlDatabase::recordIBase() CHECK_DATABASE(db); static const FieldDef fieldDefs[] = { - FieldDef("char(20)", QVariant::String, QString("Blah1"), false), - FieldDef("varchar(20)", QVariant::String, QString("Blah2")), - FieldDef("smallint", QVariant::Int, 32767), - FieldDef("float", QVariant::Double, 1.2345), - FieldDef("double precision", QVariant::Double, 1.2345678), - FieldDef("timestamp", QVariant::DateTime, QDateTime::currentDateTime()), - FieldDef("time", QVariant::Time, QTime::currentTime()), - FieldDef("decimal(18)", QVariant::LongLong, Q_INT64_C(9223372036854775807)), - FieldDef("numeric(5,2)", QVariant::Double, 123.45), - FieldDef("boolean", QVariant::Bool, true), + FieldDef("char(20)", QMetaType::QString, QString("Blah1"), false), + FieldDef("varchar(20)", QMetaType::QString, QString("Blah2")), + FieldDef("smallint", QMetaType::Int, 32767), + FieldDef("float", QMetaType::Double, 1.2345), + FieldDef("double precision", QMetaType::Double, 1.2345678), + FieldDef("timestamp", QMetaType::QDateTime, QDateTime::currentDateTime()), + FieldDef("time", QMetaType::QTime, QTime::currentTime()), + FieldDef("decimal(18)", QMetaType::LongLong, Q_INT64_C(9223372036854775807)), + FieldDef("numeric(5,2)", QMetaType::Double, 123.45), + FieldDef("boolean", QMetaType::Bool, true), FieldDef() }; @@ -1019,14 +1019,14 @@ void tst_QSqlDatabase::recordSQLite() static const FieldDef fieldDefs[] = { // The affinity of these fields are TEXT so SQLite should give us strings, not ints or doubles. - FieldDef("char(20)", QVariant::String, QString("123")), - FieldDef("varchar(20)", QVariant::String, QString("123.4")), - FieldDef("clob", QVariant::String, QString("123.45")), - FieldDef("text", QVariant::String, QString("123.456")), + FieldDef("char(20)", QMetaType::QString, QString("123")), + FieldDef("varchar(20)", QMetaType::QString, QString("123.4")), + FieldDef("clob", QMetaType::QString, QString("123.45")), + FieldDef("text", QMetaType::QString, QString("123.456")), - FieldDef("integer", QVariant::Int, QVariant(13)), - FieldDef("int", QVariant::Int, QVariant(12)), - FieldDef("real", QVariant::Double, QVariant(1.234567890123456)), + FieldDef("integer", QMetaType::Int, QVariant(13)), + FieldDef("int", QMetaType::Int, QVariant(12)), + FieldDef("real", QMetaType::Double, QVariant(1.234567890123456)), FieldDef() }; @@ -1049,13 +1049,13 @@ void tst_QSqlDatabase::recordSQLServer() // ### TODO: Add the rest of the fields static const FieldDef fieldDefs[] = { - FieldDef("varchar(20)", QVariant::String, QString("Blah1")), - FieldDef("bigint", QVariant::LongLong, 12345), - FieldDef("int", QVariant::Int, 123456), - FieldDef("tinyint", QVariant::UInt, 255), - FieldDef("float", QVariant::Double, 1.12345), - FieldDef("numeric(5,2)", QVariant::Double, 123.45), - FieldDef("uniqueidentifier", QVariant::String, + FieldDef("varchar(20)", QMetaType::QString, QString("Blah1")), + FieldDef("bigint", QMetaType::LongLong, 12345), + FieldDef("int", QMetaType::Int, 123456), + FieldDef("tinyint", QMetaType::UInt, 255), + FieldDef("float", QMetaType::Double, 1.12345), + FieldDef("numeric(5,2)", QMetaType::Double, 123.45), + FieldDef("uniqueidentifier", QMetaType::QString, QString("AA7DF450-F119-11CD-8465-00AA00425D90")), FieldDef() @@ -1082,12 +1082,12 @@ void tst_QSqlDatabase::recordAccess() // ### TODO: Add the rest of the fields static const FieldDef fieldDefs[] = { - FieldDef("varchar(20)", QVariant::String, QString("Blah1")), - FieldDef("single", QVariant::Double, 1.12345), - FieldDef("double", QVariant::Double, 1.123456), - FieldDef("byte", QVariant::UInt, 255), - FieldDef("long", QVariant::Int, 2147483647), - FieldDef("memo", QVariant::String, memo), + FieldDef("varchar(20)", QMetaType::QString, QString("Blah1")), + FieldDef("single", QMetaType::Double, 1.12345), + FieldDef("double", QMetaType::Double, 1.123456), + FieldDef("byte", QMetaType::UInt, 255), + FieldDef("long", QMetaType::Int, 2147483647), + FieldDef("memo", QMetaType::QString, memo), FieldDef() }; |