summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqlquerymodel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qsqlquerymodel')
-rw-r--r--tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
index 63202f8b44..88b5770572 100644
--- a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -95,7 +95,7 @@ private slots:
void setQueryWithNoRowsInResultSet();
private:
- void generic_data();
+ void generic_data(const QString &engine=QString());
void dropTestTables(QSqlDatabase db);
void createTestTables(QSqlDatabase db);
void populateTestTables(QSqlDatabase db);
@@ -202,10 +202,14 @@ void tst_QSqlQueryModel::populateTestTables(QSqlDatabase db)
tst_Databases::safeDropTables(db, QStringList() << qTableName("manytmp") << qTableName("test3tmp"));
}
-void tst_QSqlQueryModel::generic_data()
+void tst_QSqlQueryModel::generic_data(const QString& engine)
{
- if (dbs.fillTestTable() == 0)
- QSKIP("No database drivers are available in this Qt configuration", SkipAll);
+ if ( dbs.fillTestTable(engine) == 0 ) {
+ if(engine.isEmpty())
+ QSKIP( "No database drivers are available in this Qt configuration", SkipAll );
+ else
+ QSKIP( (QString("No database drivers of type %1 are available in this Qt configuration").arg(engine)).toLocal8Bit(), SkipAll );
+ }
}
void tst_QSqlQueryModel::init()