Fix a couple of SQL tests
One of the tests was not added to the parent subdirectory pro so this is also rectified. Change-Id: I270f1c2882260e3e3fac83d074ed6444c5dece19 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
441520141e
commit
4c75934008
@ -909,7 +909,7 @@ void tst_QSqlDatabase::recordMySQL()
|
||||
FieldDef("date", QVariant::Date, QDate::currentDate()),
|
||||
FieldDef("datetime", QVariant::DateTime, dt),
|
||||
FieldDef("timestamp", QVariant::DateTime, dt, false),
|
||||
FieldDef("time", QVariant::Time, dt.time()),
|
||||
FieldDef("time", QVariant::String, dt.time()),
|
||||
FieldDef("year", QVariant::Int, 2003),
|
||||
FieldDef("char(20)", QVariant::String, "Blah"),
|
||||
FieldDef("varchar(20)", QVariant::String, "BlahBlah"),
|
||||
|
@ -1,8 +1,8 @@
|
||||
TEMPLATE=subdirs
|
||||
SUBDIRS=\
|
||||
qtHaveModule(widgets): SUBDIRS = \
|
||||
qsqlquerymodel \
|
||||
qsqlrelationaltablemodel \
|
||||
qsqlrelationaldelegate
|
||||
|
||||
SUBDIRS += qsqlrelationaltablemodel \
|
||||
qsqltablemodel \
|
||||
|
||||
!qtHaveModule(widgets): SUBDIRS -= \
|
||||
qsqlquerymodel
|
||||
|
@ -158,12 +158,13 @@ void tst_QSqlRelationalDelegate::comboBoxEditor()
|
||||
QTest::keyClick(editor, Qt::Key_Down);
|
||||
QTest::keyClick(editor, Qt::Key_Enter);
|
||||
QCOMPARE(editor->currentText(), "mister");
|
||||
QTest::keyClick(tv.viewport(), Qt::Key_Tab);
|
||||
QVERIFY_SQL(model, submitAll());
|
||||
|
||||
QSqlQuery qry(db);
|
||||
QVERIFY_SQL(qry, exec("SELECT title_key FROM " + reltest1 + " WHERE id=1"));
|
||||
QVERIFY(qry.next());
|
||||
QCOMPARE(qry.value(0).toString(), "mister");
|
||||
QCOMPARE(qry.value(0).toString(), "2");
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QSqlRelationalDelegate)
|
||||
|
Loading…
Reference in New Issue
Block a user