diff options
author | Alejandro Exojo <suy@badopi.org> | 2014-11-20 12:55:56 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-26 10:47:32 +0100 |
commit | 6ea6ee7a129523dfe2973b92359afd672ef92f47 (patch) | |
tree | eeb0ab2527e9a972fc9ae83fe74b15f0c170203c | |
parent | 37fb892767baa08fca6f5172c51bdc1e270c72ec (diff) | |
download | qtbase-6ea6ee7a129523dfe2973b92359afd672ef92f47.tar.gz qtbase-6ea6ee7a129523dfe2973b92359afd672ef92f47.tar.bz2 qtbase-6ea6ee7a129523dfe2973b92359afd672ef92f47.zip |
Adjust DBMSType to DbmsType to follow conventions
The enum was made public in f84b00c6d26eb7a3a6802210d2a8b12ddbf815aa, but this
makes it follow the convention to camel case acronyms too before it's too late
to change it.
Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/sql/kernel/qsqldriver.cpp | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqldriver.h | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqldriver_p.h | 4 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_databases.h | 10 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 32 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp | 6 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 46 | ||||
-rw-r--r-- | tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp | 8 | ||||
-rw-r--r-- | tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp | 20 | ||||
-rw-r--r-- | tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 6 | ||||
-rw-r--r-- | tests/benchmarks/sql/kernel/qsqlquery/main.cpp | 6 |
11 files changed, 75 insertions, 75 deletions
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 736fe310e3..f218016876 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -237,11 +237,11 @@ bool QSqlDriver::isOpenError() const */ /*! - \enum QSqlDriver::DBMSType + \enum QSqlDriver::DbmsType This enum contains DBMS types. - \value UnknownDBMS + \value UnknownDbms \value MSSqlServer \value MySqlServer \value PostgreSQL @@ -787,7 +787,7 @@ QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const Returns the current DBMS type for the database connection. */ -QSqlDriver::DBMSType QSqlDriver::dbmsType() const +QSqlDriver::DbmsType QSqlDriver::dbmsType() const { return d_func()->dbmsType; } diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h index 767c1ac74d..eabda74da5 100644 --- a/src/sql/kernel/qsqldriver.h +++ b/src/sql/kernel/qsqldriver.h @@ -71,8 +71,8 @@ public: enum NotificationSource { UnknownSource, SelfSource, OtherSource }; - enum DBMSType { - UnknownDBMS, + enum DbmsType { + UnknownDbms, MSSqlServer, MySqlServer, PostgreSQL, @@ -123,7 +123,7 @@ public: void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy); QSql::NumericalPrecisionPolicy numericalPrecisionPolicy() const; - DBMSType dbmsType() const; + DbmsType dbmsType() const; public Q_SLOTS: virtual bool cancelQuery(); diff --git a/src/sql/kernel/qsqldriver_p.h b/src/sql/kernel/qsqldriver_p.h index 427e3984fa..c511f8e13b 100644 --- a/src/sql/kernel/qsqldriver_p.h +++ b/src/sql/kernel/qsqldriver_p.h @@ -61,14 +61,14 @@ public: isOpen(false), isOpenError(false), precisionPolicy(QSql::LowPrecisionDouble), - dbmsType(QSqlDriver::UnknownDBMS) + dbmsType(QSqlDriver::UnknownDbms) { } uint isOpen; uint isOpenError; QSqlError error; QSql::NumericalPrecisionPolicy precisionPolicy; - QSqlDriver::DBMSType dbmsType; + QSqlDriver::DbmsType dbmsType; }; QT_END_NAMESPACE diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index d5ccc194bb..af6dc6b9f4 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -385,7 +385,7 @@ public: bool wasDropped; QSqlQuery q( db ); QStringList dbtables=db.tables(); - QSqlDriver::DBMSType dbType = getDatabaseType(db); + QSqlDriver::DbmsType dbType = getDatabaseType(db); foreach(const QString &tableName, tableNames) { wasDropped = true; @@ -462,7 +462,7 @@ public: // blobSize is only used if the db doesn't have a generic blob type static QString blobTypeName( QSqlDatabase db, int blobSize = 10000 ) { - const QSqlDriver::DBMSType dbType = getDatabaseType(db); + const QSqlDriver::DbmsType dbType = getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) return "longblob"; @@ -491,7 +491,7 @@ public: static QString dateTimeTypeName(QSqlDatabase db) { - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) return QLatin1String("timestamp"); if (dbType == QSqlDriver::Oracle && getOraVersion(db) >= 9) @@ -501,7 +501,7 @@ public: static QString autoFieldName( QSqlDatabase db ) { - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) return "AUTO_INCREMENT"; if (dbType == QSqlDriver::Sybase || dbType == QSqlDriver::MSSqlServer) @@ -538,7 +538,7 @@ public: return result.toLocal8Bit(); } - static QSqlDriver::DBMSType getDatabaseType(QSqlDatabase db) + static QSqlDriver::DbmsType getDatabaseType(QSqlDatabase db) { QSqlDriverPrivate *d = static_cast<QSqlDriverPrivate *>(QObjectPrivate::get(db.driver())); return d->dbmsType; diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 6faf8b7ed5..c314528065 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -234,7 +234,7 @@ struct FieldDef { // excluding the primary key field static int createFieldTable(const FieldDef fieldDefs[], QSqlDatabase db) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString tableName = qTableName("qtestfields", __FILE__, db); tst_Databases::safeDropTable(db, tableName); QSqlQuery q(db); @@ -281,7 +281,7 @@ void tst_QSqlDatabase::createTestTables(QSqlDatabase db) return; const QString tableName = qTableName("qtest", __FILE__, db); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) { // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script @@ -318,7 +318,7 @@ void tst_QSqlDatabase::dropTestTables(QSqlDatabase db) if (!db.isValid()) return; - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) { QSqlQuery q(db); QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -485,7 +485,7 @@ void tst_QSqlDatabase::open() QVERIFY(!db.isOpenError()); } - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::SQLite && db.databaseName() == ":memory:") { // tables in in-memory databases don't survive an open/close createTestTables(db); @@ -498,7 +498,7 @@ void tst_QSqlDatabase::tables() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest(qTableName("qtest", __FILE__, db)), qtest_view(qTableName("qtest_view", __FILE__, db)), temp_tab(qTableName("test_tab", __FILE__, db)); @@ -562,7 +562,7 @@ void tst_QSqlDatabase::whitespaceInIdentifiers() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (testWhiteSpaceNames(db.driverName())) { const QString tableName(qTableName("qtest", __FILE__, db) + " test"); @@ -830,7 +830,7 @@ void tst_QSqlDatabase::recordPSQL() QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); const QString tableName = qTableName("qtestfields", __FILE__, db); @@ -1017,7 +1017,7 @@ void tst_QSqlDatabase::recordSQLServer() QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL server specific test"); @@ -1076,7 +1076,7 @@ void tst_QSqlDatabase::transaction() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest(qTableName("qtest", __FILE__, db)); if (!db.driver()->hasFeature(QSqlDriver::Transactions)) @@ -1124,7 +1124,7 @@ void tst_QSqlDatabase::bigIntField() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest_bigint(qTableName("qtest_bigint", __FILE__, db)); QSqlQuery q(db); @@ -1189,7 +1189,7 @@ void tst_QSqlDatabase::caseSensivity() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); bool cs = false; if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::SQLite || dbType == QSqlDriver::Sybase @@ -1222,7 +1222,7 @@ void tst_QSqlDatabase::noEscapedFieldNamesInRecord() CHECK_DATABASE(db); QString fieldname("t_varchar"); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Oracle || dbType == QSqlDriver::Interbase || dbType == QSqlDriver::DB2) fieldname = fieldname.toUpper(); @@ -1405,7 +1405,7 @@ void tst_QSqlDatabase::precisionPolicy() QString query = QString("SELECT num FROM %1 WHERE id = 1").arg(tableName); QVERIFY_SQL(q, exec(query)); QVERIFY_SQL(q, next()); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::SQLite) QEXPECT_FAIL("", "SQLite returns this value as determined by contents of the field, not the declaration", Continue); QCOMPARE(q.value(0).type(), QVariant::String); @@ -1742,7 +1742,7 @@ void tst_QSqlDatabase::odbc_bindBoolean() QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) QSKIP("MySql has inconsistent behaviour of bit field type across versions."); @@ -1777,7 +1777,7 @@ void tst_QSqlDatabase::odbc_testqGetString() const QString testqGetString(qTableName("testqGetString", __FILE__, db)); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MSSqlServer) QVERIFY_SQL(q, exec("CREATE TABLE " + testqGetString + "(id int, vcvalue varchar(MAX))")); else if(tst_Databases::isMSAccess(db)) @@ -1957,7 +1957,7 @@ void tst_QSqlDatabase::odbc_uniqueidentifier() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server (ODBC) specific test"); diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp index fa0f7eaf34..7c0b4ebc88 100644 --- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp @@ -71,7 +71,7 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db) QSqlQuery q(db); const QString relTEST1(qTableName("relTEST1", __FILE__, db)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -122,7 +122,7 @@ void tst_QSqlDriver::record() QSqlRecord rec = db.driver()->record(tablename); QCOMPARE(rec.count(), 4); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record() if (dbType == QSqlDriver::MSSqlServer && db.driverName().startsWith("QODBC")) QCOMPARE(rec.field(1).length(), 20); @@ -174,7 +174,7 @@ void tst_QSqlDriver::primaryIndex() QSqlIndex index = db.driver()->primaryIndex(tablename); QCOMPARE(index.count(), 1); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) QCOMPARE(index.fieldName(0), QString::fromLatin1("ID")); else diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index b4863d4a82..f5d71a75cf 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -283,7 +283,7 @@ void tst_QSqlQuery::cleanup() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( QTest::currentTestFunction() == QLatin1String( "numRowsAffected" ) || QTest::currentTestFunction() == QLatin1String( "transactions" ) || QTest::currentTestFunction() == QLatin1String( "size" ) @@ -311,7 +311,7 @@ void tst_QSqlQuery::generic_data(const QString& engine) void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QStringList tablenames; // drop all the table in case a testcase failed tablenames << qtest @@ -374,7 +374,7 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) void tst_QSqlQuery::createTestTables( QSqlDatabase db ) { QSqlQuery q( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script @@ -426,7 +426,7 @@ void tst_QSqlQuery::char1Select() QVERIFY_SQL(q, exec("insert into " + tbl + " values ('a')")); QVERIFY_SQL(q, exec("select * from " + tbl)); QVERIFY( q.next() ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) QCOMPARE( q.value( 0 ).toString().left( 1 ), QString( "a" ) ); else @@ -441,7 +441,7 @@ void tst_QSqlQuery::char1SelectUnicode() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::DB2) QSKIP("Needs someone with more Unicode knowledge than I have to fix"); @@ -588,7 +588,7 @@ void tst_QSqlQuery::bindBool() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString tableName(qTableName("bindBool", __FILE__, db)); q.exec("DROP TABLE " + tableName); @@ -845,7 +845,7 @@ void tst_QSqlQuery::outValues() QSqlQuery q( db ); q.setForwardOnly( true ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Oracle) { QVERIFY_SQL( q, exec( "create or replace procedure " + tst_outValues + "(x out int) is\n" "begin\n" @@ -934,7 +934,7 @@ void tst_QSqlQuery::value() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q( db ); QVERIFY_SQL( q, exec( "select id, t_varchar, t_char from " + qtest + " order by id" ) ); int i = 1; @@ -1520,7 +1520,7 @@ void tst_QSqlQuery::precision() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) QSKIP("DB unable to store high precision"); @@ -1596,7 +1596,7 @@ void tst_QSqlQuery::transaction() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( !db.driver()->hasFeature( QSqlDriver::Transactions ) ) QSKIP( "DBMS not transaction capable"); @@ -1679,7 +1679,7 @@ void tst_QSqlQuery::joins() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtestj1(qTableName("qtestj1", __FILE__, db)), qtestj2(qTableName("qtestj2", __FILE__, db)); if (dbType == QSqlDriver::Oracle || dbType == QSqlDriver::Sybase @@ -1763,7 +1763,7 @@ void tst_QSqlQuery::prepare_bind_exec() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest_prepare(qTableName("qtest_prepare", __FILE__, db)); if (dbType == QSqlDriver::Interbase && (db.databaseName() == "silence.nokia.troll.no:c:\\ibase\\testdb_ascii" || db.databaseName() == "/opt/interbase/qttest.gdb")) @@ -1785,7 +1785,7 @@ void tst_QSqlQuery::prepare_bind_exec() useUnicode = false; QString createQuery; - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -2059,7 +2059,7 @@ void tst_QSqlQuery::sqlServerLongStrings() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP( "SQL Server specific test"); @@ -2105,7 +2105,7 @@ void tst_QSqlQuery::invalidQuery() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q( db ); QVERIFY( !q.exec() ); @@ -2442,7 +2442,7 @@ void tst_QSqlQuery::createQueryOnClosedDatabase() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // Only supported by these drivers if (dbType != QSqlDriver::PostgreSQL && dbType != QSqlDriver::Oracle @@ -2574,7 +2574,7 @@ void tst_QSqlQuery::nextResult() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( !db.driver()->hasFeature( QSqlDriver::MultipleResultSets ) || !db.driver()->hasFeature( QSqlDriver::BatchOperations ) ) QSKIP( "DBMS does not support multiple result sets or batch operations"); @@ -2774,7 +2774,7 @@ void tst_QSqlQuery::blobsPreparedQuery() // In PostgreSQL a BLOB is not called a BLOB, but a BYTEA! :-) // ... and in SQL Server it can be called a lot, but IMAGE will do. - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QString typeName( "BLOB" ); if (dbType == QSqlDriver::PostgreSQL) typeName = "BYTEA"; @@ -3053,7 +3053,7 @@ void tst_QSqlQuery::sqlServerReturn0() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server specific test"); @@ -3169,7 +3169,7 @@ void tst_QSqlQuery::QTBUG_18435() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer || !db.driverName().startsWith("QODBC")) QSKIP("SQL Server specific test"); @@ -3251,7 +3251,7 @@ void tst_QSqlQuery::QTBUG_6618() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server specific test"); @@ -3668,7 +3668,7 @@ void tst_QSqlQuery::sqlite_constraint() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::SQLite) QSKIP("Sqlite3 specific test"); @@ -3720,7 +3720,7 @@ void tst_QSqlQuery::aggregateFunctionTypes() CHECK_DATABASE(db); QVariant::Type intType = QVariant::Int; // QPSQL uses LongLong for manipulation of integers - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::PostgreSQL) intType = QVariant::LongLong; else if (dbType == QSqlDriver::Oracle) diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp index 84e2fd57de..fc10f21904 100644 --- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp +++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp @@ -150,7 +150,7 @@ void tst_QSqlQueryModel::createTestTables(QSqlDatabase db) { dropTestTables(db); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); QVERIFY_SQL( q, exec("create table " + qTableName("test", __FILE__, db) + "(id integer not null, name varchar(20), title integer, primary key (id))")); @@ -305,7 +305,7 @@ void tst_QSqlQueryModel::insertColumn() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); DBTestModel model; model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__, db), db)); @@ -409,7 +409,7 @@ void tst_QSqlQueryModel::record() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQueryModel model; model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__, db), db)); @@ -440,7 +440,7 @@ void tst_QSqlQueryModel::setHeaderData() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQueryModel model; diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index e97c391a52..a32c672370 100644 --- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -143,7 +143,7 @@ void tst_QSqlRelationalTableModel::initTestCase() { foreach (const QString &dbname, dbs.dbNames) { QSqlDatabase db=QSqlDatabase::database(dbname); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) { db.exec("SET DIALECT 3"); } else if (dbType == QSqlDriver::MSSqlServer) { @@ -238,7 +238,7 @@ void tst_QSqlRelationalTableModel::setData() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // set the values using OnRowChange Strategy { @@ -554,7 +554,7 @@ void tst_QSqlRelationalTableModel::insertWithStrategies() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -746,7 +746,7 @@ void tst_QSqlRelationalTableModel::sort() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -912,7 +912,7 @@ void tst_QSqlRelationalTableModel::clearDisplayValuesCache() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -966,7 +966,7 @@ void tst_QSqlRelationalTableModel::insertRecordDuplicateFieldNames() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); model.setTable(reltest3); @@ -1088,7 +1088,7 @@ void tst_QSqlRelationalTableModel::casing() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::SQLite || dbType == QSqlDriver::MSSqlServer) QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities"); @@ -1155,7 +1155,7 @@ void tst_QSqlRelationalTableModel::escapedRelations() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); recreateTestTables(db); @@ -1266,7 +1266,7 @@ void tst_QSqlRelationalTableModel::escapedTableName() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // set the values using OnRowChange Strategy with an escaped tablename { @@ -1455,7 +1455,7 @@ void tst_QSqlRelationalTableModel::psqlSchemaTest() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::PostgreSQL) QSKIP("Postgresql specific test"); diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index b77b883b03..f0aaa36170 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -160,7 +160,7 @@ void tst_QSqlTableModel::dropTestTables() { for (int i = 0; i < dbs.dbNames.count(); ++i) { QSqlDatabase db = QSqlDatabase::database(dbs.dbNames.at(i)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -189,7 +189,7 @@ void tst_QSqlTableModel::createTestTables() { for (int i = 0; i < dbs.dbNames.count(); ++i) { QSqlDatabase db = QSqlDatabase::database(dbs.dbNames.at(i)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); QVERIFY_SQL( q, exec("create table " + test + "(id int, name varchar(20), title int)")); @@ -1699,7 +1699,7 @@ void tst_QSqlTableModel::primaryKeyOrder() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); diff --git a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp index 769dbe6d47..c8375a6d28 100644 --- a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp +++ b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp @@ -109,7 +109,7 @@ void tst_QSqlQuery::cleanup() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( QTest::currentTestFunction() == QLatin1String( "numRowsAffected" ) || QTest::currentTestFunction() == QLatin1String( "transactions" ) @@ -138,7 +138,7 @@ void tst_QSqlQuery::generic_data(const QString& engine) void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QStringList tablenames; // drop all the table in case a testcase failed tablenames << qtest @@ -199,7 +199,7 @@ void tst_QSqlQuery::createTestTables( QSqlDatabase db ) { const QString qtestNull = qTableName("qtest_null", __FILE__, db); QSqlQuery q( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script |