summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2023-04-18 19:40:25 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2023-05-24 17:27:55 +0200
commit048a68c1e965350ad9ff7d4ab1fdaac56a2583a0 (patch)
treea553e36d759b968cd71844c4a58792b8c311ee62 /tests/auto/sql/kernel
parent68f35a571a259cd83490c093af01d8b4e9b0e34a (diff)
SQL: Make QSqlDatabase::DriverDict creation thread-safe
Make the QSqlDatabase::DriverDict thread-safe and make sure it's properly cleaned up on destruction. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-112961 Change-Id: I1ff70e477579231754ef829fdede944d6042894d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/sql/kernel')
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index 78f48a4117..4ccfff8647 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -121,6 +121,10 @@ void tst_QSql::open()
void tst_QSql::openInvalid()
{
+ int argc = 1;
+ char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
+ QCoreApplication app(argc, argv, false);
+
QSqlDatabase db;
QVERIFY(!db.open());