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("date", QVariant::Date, QDate::currentDate()),
|
||||||
FieldDef("datetime", QVariant::DateTime, dt),
|
FieldDef("datetime", QVariant::DateTime, dt),
|
||||||
FieldDef("timestamp", QVariant::DateTime, dt, false),
|
FieldDef("timestamp", QVariant::DateTime, dt, false),
|
||||||
FieldDef("time", QVariant::Time, dt.time()),
|
FieldDef("time", QVariant::String, dt.time()),
|
||||||
FieldDef("year", QVariant::Int, 2003),
|
FieldDef("year", QVariant::Int, 2003),
|
||||||
FieldDef("char(20)", QVariant::String, "Blah"),
|
FieldDef("char(20)", QVariant::String, "Blah"),
|
||||||
FieldDef("varchar(20)", QVariant::String, "BlahBlah"),
|
FieldDef("varchar(20)", QVariant::String, "BlahBlah"),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
TEMPLATE=subdirs
|
TEMPLATE=subdirs
|
||||||
SUBDIRS=\
|
qtHaveModule(widgets): SUBDIRS = \
|
||||||
qsqlquerymodel \
|
qsqlquerymodel \
|
||||||
qsqlrelationaltablemodel \
|
qsqlrelationaldelegate
|
||||||
|
|
||||||
|
SUBDIRS += qsqlrelationaltablemodel \
|
||||||
qsqltablemodel \
|
qsqltablemodel \
|
||||||
|
|
||||||
!qtHaveModule(widgets): SUBDIRS -= \
|
|
||||||
qsqlquerymodel
|
|
||||||
|
@ -158,12 +158,13 @@ void tst_QSqlRelationalDelegate::comboBoxEditor()
|
|||||||
QTest::keyClick(editor, Qt::Key_Down);
|
QTest::keyClick(editor, Qt::Key_Down);
|
||||||
QTest::keyClick(editor, Qt::Key_Enter);
|
QTest::keyClick(editor, Qt::Key_Enter);
|
||||||
QCOMPARE(editor->currentText(), "mister");
|
QCOMPARE(editor->currentText(), "mister");
|
||||||
|
QTest::keyClick(tv.viewport(), Qt::Key_Tab);
|
||||||
QVERIFY_SQL(model, submitAll());
|
QVERIFY_SQL(model, submitAll());
|
||||||
|
|
||||||
QSqlQuery qry(db);
|
QSqlQuery qry(db);
|
||||||
QVERIFY_SQL(qry, exec("SELECT title_key FROM " + reltest1 + " WHERE id=1"));
|
QVERIFY_SQL(qry, exec("SELECT title_key FROM " + reltest1 + " WHERE id=1"));
|
||||||
QVERIFY(qry.next());
|
QVERIFY(qry.next());
|
||||||
QCOMPARE(qry.value(0).toString(), "mister");
|
QCOMPARE(qry.value(0).toString(), "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_QSqlRelationalDelegate)
|
QTEST_MAIN(tst_QSqlRelationalDelegate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user