don't unnecessarily use qtgui
Change-Id: Ia4162d75ef6ebf87f36d40163d5ffc89eae64dc6 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
parent
934fbfc6cf
commit
d3ba95f5c1
@ -3,7 +3,7 @@ CONFIG += parallel_test
|
||||
TARGET = tst_qsql
|
||||
SOURCES += tst_qsql.cpp
|
||||
|
||||
QT += sql sql-private gui testlib core-private
|
||||
QT = core-private sql-private testlib
|
||||
|
||||
wince*: {
|
||||
DEPLOYMENT_PLUGIN += qsqlite
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qguiapplication.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qsqlerror.h>
|
||||
#include <qsqlquery.h>
|
||||
@ -115,7 +115,7 @@ void tst_QSql::basicDriverTest()
|
||||
{
|
||||
int argc = 1;
|
||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
QGuiApplication app(argc, argv, false);
|
||||
QCoreApplication app(argc, argv, false);
|
||||
tst_Databases dbs;
|
||||
dbs.open();
|
||||
|
||||
@ -150,7 +150,7 @@ void tst_QSql::basicDriverTest()
|
||||
}
|
||||
|
||||
// make sure that the static stuff will be deleted
|
||||
// when using multiple QGuiApplication objects
|
||||
// when using multiple QCoreApplication objects
|
||||
void tst_QSql::open()
|
||||
{
|
||||
int i;
|
||||
@ -158,7 +158,7 @@ void tst_QSql::open()
|
||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
int count = -1;
|
||||
for (i = 0; i < 10; ++i) {
|
||||
QGuiApplication app(argc, argv, false);
|
||||
QCoreApplication app(argc, argv, false);
|
||||
tst_Databases dbs;
|
||||
|
||||
dbs.open();
|
||||
@ -185,7 +185,7 @@ void tst_QSql::concurrentAccess()
|
||||
{
|
||||
int argc = 1;
|
||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
QGuiApplication app(argc, argv, false);
|
||||
QCoreApplication app(argc, argv, false);
|
||||
tst_Databases dbs;
|
||||
|
||||
dbs.open();
|
||||
@ -214,7 +214,7 @@ void tst_QSql::openErrorRecovery()
|
||||
{
|
||||
int argc = 1;
|
||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
QGuiApplication app(argc, argv, false);
|
||||
QCoreApplication app(argc, argv, false);
|
||||
tst_Databases dbs;
|
||||
|
||||
dbs.addDbs();
|
||||
@ -262,7 +262,7 @@ void tst_QSql::registerSqlDriver()
|
||||
{
|
||||
int argc = 1;
|
||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
QGuiApplication app(argc, argv, false);
|
||||
QCoreApplication app(argc, argv, false);
|
||||
|
||||
QSqlDatabase::registerSqlDriver("QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver>);
|
||||
QVERIFY(QSqlDatabase::drivers().contains("QSQLTESTDRIVER"));
|
||||
|
Loading…
Reference in New Issue
Block a user