Skip to content

Commit 9389f2d

Browse files
committed
add tests for SQL driver plugins being available
1 parent f5d7b11 commit 9389f2d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/sqldrivers/main.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <QDebug>
2+
#include <QSqlDatabase>
3+
4+
int main()
5+
{
6+
auto drivers = QSqlDatabase::drivers();
7+
qDebug() << "Available drivers:" << drivers;
8+
9+
if (!drivers.contains("QMYSQL") || !drivers.contains("QPSQL"))
10+
return 1;
11+
12+
return 0;
13+
}

tests/sqldrivers/sqldrivers.pro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
QT += core
2+
QT -= gui
3+
QT += sql
4+
TARGET = sqldrivers
5+
CONFIG += console
6+
CONFIG -= app_bundle
7+
TEMPLATE = app
8+
SOURCES += main.cpp

0 commit comments

Comments
 (0)