summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel/qsql/tst_qsql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/sql/kernel/qsql/tst_qsql.cpp')
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index 2cbf30ba74..e9c11e5966 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -116,8 +116,9 @@ void tst_QSql::cleanup()
// of a field "id"(integer) and "name"(char/varchar).
void tst_QSql::basicDriverTest()
{
- int argc = 0;
- QGuiApplication app( argc, 0, false );
+ int argc = 1;
+ const char *argv[] = {"test"};
+ QGuiApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs;
dbs.open();
@@ -157,11 +158,11 @@ void tst_QSql::basicDriverTest()
void tst_QSql::open()
{
int i;
- int argc = 0;
+ int argc = 1;
+ const char *argv[] = {"test"};
int count = -1;
for ( i = 0; i < 10; ++i ) {
-
- QApplication app( argc, 0, false );
+ QApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs;
dbs.open();
@@ -186,8 +187,9 @@ void tst_QSql::openInvalid()
void tst_QSql::concurrentAccess()
{
- int argc = 0;
- QGuiApplication app( argc, 0, false );
+ int argc = 1;
+ const char *argv[] = {"test"};
+ QGuiApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs;
dbs.open();
@@ -214,8 +216,9 @@ void tst_QSql::concurrentAccess()
void tst_QSql::openErrorRecovery()
{
- int argc = 0;
- QGuiApplication app( argc, 0, false );
+ int argc = 1;
+ const char *argv[] = {"test"};
+ QGuiApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs;
dbs.addDbs();
@@ -261,8 +264,9 @@ void tst_QSql::openErrorRecovery()
void tst_QSql::registerSqlDriver()
{
- int argc = 0;
- QGuiApplication app( argc, 0, false );
+ int argc = 1;
+ const char *argv[] = {"test"};
+ QGuiApplication app(argc, const_cast<char **>(argv), false);
QSqlDatabase::registerSqlDriver( "QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver> );
QVERIFY( QSqlDatabase::drivers().contains( "QSQLTESTDRIVER" ) );