diff options
author | Andy Shaw <[email protected]> | 2013-03-30 19:55:25 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-04-02 19:02:26 +0200 |
commit | 406c8ef6e67da5505c7404a2517a8b4204d7c38a (patch) | |
tree | 1257c680456e3fa4e386995f7703096982863ac0 /src/sql/drivers/odbc/qsql_odbc.cpp | |
parent | dcf9c403ba8e903bb52a6fb656c7e2de23383c10 (diff) |
Move the dbmstype to QSqlDriverPrivate so it can be used for all drivers
By moving it to QSqlDriverPrivate we make it easier to check what
database is actually connected which is particularly useful for the
autotests.
Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa
Reviewed-by: Mark Brand <[email protected]>
Diffstat (limited to 'src/sql/drivers/odbc/qsql_odbc.cpp')
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 55c97644b88..f92cda8c252 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -57,6 +57,7 @@ #include <qmath.h> #include <QDebug> #include <QSqlQuery> +#include <QtSql/private/qsqldriver_p.h> QT_BEGIN_NAMESPACE @@ -111,15 +112,13 @@ inline static QVarLengthArray<SQLTCHAR> toSQLTCHAR(const QString &input) return result; } -class QODBCDriverPrivate +class QODBCDriverPrivate : public QSqlDriverPrivate { public: enum DefaultCase{Lower, Mixed, Upper, Sensitive}; - enum DBMSType {UnknownDB, MSSqlServer, MySqlServer, PostgreSQL, Oracle, Sybase}; QODBCDriverPrivate() - : hEnv(0), hDbc(0), unicode(false), useSchema(false), disconnectCount(0), datetime_precision(19), - dbmsType(UnknownDB), isFreeTDSDriver(false), hasSQLFetchScroll(true), - hasMultiResultSets(false), isQuoteInitialized(false), quote(QLatin1Char('"')) + : QSqlDriverPrivate(), hEnv(0), hDbc(0), unicode(false), useSchema(false), disconnectCount(0), datetime_precision(19), + isFreeTDSDriver(false), hasSQLFetchScroll(true), hasMultiResultSets(false), isQuoteInitialized(false), quote(QLatin1Char('"')) { } @@ -130,7 +129,6 @@ public: bool useSchema; int disconnectCount; int datetime_precision; - DBMSType dbmsType; bool isFreeTDSDriver; bool hasSQLFetchScroll; bool hasMultiResultSets; @@ -1794,7 +1792,6 @@ void QODBCDriver::init() QODBCDriver::~QODBCDriver() { cleanup(); - delete d; } bool QODBCDriver::hasFeature(DriverFeature f) const |