summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorPulse Build System <qt-info@nokia.com>2010-01-22 00:53:04 (GMT)
committerPulse Build System <qt-info@nokia.com>2010-01-22 00:53:04 (GMT)
commit0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7 (patch)
treecdc404155a92000c1a0b6ebe1fbda74b22457ec0 /src/sql
parent8e65adce9ced8f3b1d42b938e4d65e1af4768c33 (diff)
parent5c8c51284b1119f90520b6dbad0ac23fe0487bcf (diff)
downloadQt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.zip
Qt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.tar.gz
Qt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2: build fix for mingw Build fix for MSVC2005 and older SDK QStyleSheetStyle: Fixed some text croped when having padding with native border. Remove obsolete code for unsupported platforms Character spacing when drawing a QPicture to a high DPI device.
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp20
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.h10
2 files changed, 0 insertions, 30 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 2049a76..18bc743 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -62,13 +62,6 @@ QT_BEGIN_NAMESPACE
// undefine this to prevent initial check of the ODBC driver
#define ODBC_CHECK_DRIVER
-#if defined(Q_ODBC_VERSION_2)
-//crude hack to get non-unicode capable driver managers to work
-# undef UNICODE
-# define SQLTCHAR SQLCHAR
-# define SQL_C_WCHAR SQL_C_CHAR
-#endif
-
// newer platform SDKs use SQLLEN instead of SQLINTEGER
#if defined(WIN32) && (_MSC_VER < 1300)
# define QSQLLEN SQLINTEGER
@@ -298,13 +291,11 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi
case SQL_TYPE_TIMESTAMP:
type = QVariant::DateTime;
break;
-#ifndef Q_ODBC_VERSION_2
case SQL_WCHAR:
case SQL_WVARCHAR:
case SQL_WLONGVARCHAR:
type = QVariant::String;
break;
-#endif
case SQL_CHAR:
case SQL_VARCHAR:
case SQL_GUID:
@@ -577,10 +568,8 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
static int qGetODBCVersion(const QString &connOpts)
{
-#ifndef Q_ODBC_VERSION_2
if (connOpts.contains(QLatin1String("SQL_ATTR_ODBC_VERSION=SQL_OV_ODBC3"), Qt::CaseInsensitive))
return SQL_OV_ODBC3;
-#endif
return SQL_OV_ODBC2;
}
@@ -679,7 +668,6 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
continue;
}
r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0);
-#ifndef Q_ODBC_VERSION_2
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CONNECTION_POOLING")) {
if (val == QLatin1String("SQL_CP_OFF"))
v = SQL_CP_OFF;
@@ -706,7 +694,6 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
continue;
}
r = SQLSetConnectAttr(hDbc, SQL_ATTR_CP_MATCH, (SQLPOINTER)v, 0);
-#endif
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_ODBC_VERSION")) {
// Already handled in QODBCDriver::open()
continue;
@@ -1432,7 +1419,6 @@ bool QODBCResult::exec()
*ind == SQL_NULL_DATA ? ind : NULL);
break;
case QVariant::String:
-#ifndef Q_ODBC_VERSION_2
if (d->unicode) {
QString str = val.toString();
str.utf16();
@@ -1469,7 +1455,6 @@ bool QODBCResult::exec()
break;
}
else
-#endif
{
QByteArray str = val.toString().toAscii();
if (*ind != SQL_NULL_DATA)
@@ -1870,11 +1855,6 @@ void QODBCDriver::cleanup()
// as two byte unicode characters
void QODBCDriverPrivate::checkUnicode()
{
-#if defined(Q_ODBC_VERSION_2)
- unicode = false;
- return;
-#endif
-
SQLRETURN r;
SQLUINTEGER fFunc;
diff --git a/src/sql/drivers/odbc/qsql_odbc.h b/src/sql/drivers/odbc/qsql_odbc.h
index 145a902..836dbd6 100644
--- a/src/sql/drivers/odbc/qsql_odbc.h
+++ b/src/sql/drivers/odbc/qsql_odbc.h
@@ -49,13 +49,6 @@
#include <QtCore/qt_windows.h>
#endif
-#if defined (Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3)
-// assume we use iodbc on MACX
-// comment next line out if you use a
-// unicode compatible manager
-# define Q_ODBC_VERSION_2
-#endif
-
#ifdef QT_PLUGIN
#define Q_EXPORT_SQLDRIVER_ODBC
#else
@@ -75,10 +68,7 @@
# undef _MSC_VER
#endif
-#ifndef Q_ODBC_VERSION_2
#include <sqlucode.h>
-#endif
-
#include <sqlext.h>
QT_BEGIN_HEADER