diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-08 09:28:00 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-02-08 12:31:02 +0100 |
commit | fbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch) | |
tree | 92da72786b3740e37004623612c4fc1c9640d30f /tests/auto/sql | |
parent | c1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff) | |
parent | 74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/android/templates/AndroidManifest.xml
src/network/ssl/qsslsocket_mac.cpp
src/widgets/styles/qstylesheetstyle.cpp
tests/auto/corelib/kernel/qtimer/BLACKLIST
tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
tests/auto/testlib/selftests/expected_blacklisted.lightxml
tests/auto/testlib/selftests/expected_blacklisted.tap
tests/auto/testlib/selftests/expected_blacklisted.teamcity
tests/auto/testlib/selftests/expected_blacklisted.txt
tests/auto/testlib/selftests/expected_blacklisted.xml
tests/auto/testlib/selftests/expected_blacklisted.xunitxml
tests/auto/testlib/selftests/expected_float.tap
tests/auto/testlib/selftests/expected_float.teamcity
tests/auto/testlib/selftests/expected_float.txt
tests/auto/testlib/selftests/expected_float.xunitxml
Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'tests/auto/sql')
-rw-r--r-- | tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index b4b92ebe9a..784d0a70d7 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -158,6 +158,8 @@ private slots: void lastInsertId(); void lastQuery_data() { generic_data(); } void lastQuery(); + void lastQueryTwoQueries_data() { generic_data(); } + void lastQueryTwoQueries(); void bindBool_data() { generic_data(); } void bindBool(); void psql_bindWithDoubleColonCastOperator_data() { generic_data("QPSQL"); } @@ -2813,6 +2815,25 @@ void tst_QSqlQuery::lastQuery() QCOMPARE( q.executedQuery(), sql ); } +void tst_QSqlQuery::lastQueryTwoQueries() +{ + QFETCH(QString, dbName); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + + QSqlQuery q(db); + + QString sql = QLatin1String("select * from ") + qtest; + QVERIFY_SQL(q, exec(sql)); + QCOMPARE(q.lastQuery(), sql); + QCOMPARE(q.executedQuery(), sql); + + sql = QLatin1String("select id from ") + qtest; + QVERIFY_SQL(q, exec(sql)); + QCOMPARE(q.lastQuery(), sql); + QCOMPARE(q.executedQuery(), sql); +} + void tst_QSqlQuery::psql_bindWithDoubleColonCastOperator() { QFETCH( QString, dbName ); |