summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/odbc/qsql_odbc.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:19:28 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:19:28 (GMT)
commit162892030766ffe8711888ea9e8d3a368c6a75b2 (patch)
treeddfda2e163fdce5d7ead7ac1fbd7aedb4bb06b79 /src/sql/drivers/odbc/qsql_odbc.cpp
parent0bc91ae61b07751f44210e1b772679c0a180c900 (diff)
parent26b8b6783afe2c1c9f27c935eb46c05229757af1 (diff)
downloadQt-162892030766ffe8711888ea9e8d3a368c6a75b2.zip
Qt-162892030766ffe8711888ea9e8d3a368c6a75b2.tar.gz
Qt-162892030766ffe8711888ea9e8d3a368c6a75b2.tar.bz2
Merge branch '4.6'
Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
Diffstat (limited to 'src/sql/drivers/odbc/qsql_odbc.cpp')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp54
1 files changed, 24 insertions, 30 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 6a8609e..06ee3e1 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -743,37 +743,31 @@ void QODBCDriverPrivate::splitTableQualifier(const QString & qualifier, QString
QODBCDriverPrivate::DefaultCase QODBCDriverPrivate::defaultCase() const
{
- static bool isInitialized = false;
- static DefaultCase ret;
-
- if (!isInitialized) {
- SQLUSMALLINT casing;
- int r = SQLGetInfo(hDbc,
- SQL_IDENTIFIER_CASE,
- &casing,
- sizeof(casing),
- NULL);
- if ( r != SQL_SUCCESS)
- ret = Lower;//arbitrary case if driver cannot be queried
- else {
- switch (casing) {
- case (SQL_IC_UPPER):
- ret = Upper;
- break;
- case (SQL_IC_LOWER):
- ret = Lower;
- break;
- case (SQL_IC_SENSITIVE):
- ret = Sensitive;
- break;
- case (SQL_IC_MIXED):
- ret = Mixed;
- break;
- default:
- ret = Upper;
- }
+ DefaultCase ret;
+ SQLUSMALLINT casing;
+ int r = SQLGetInfo(hDbc,
+ SQL_IDENTIFIER_CASE,
+ &casing,
+ sizeof(casing),
+ NULL);
+ if ( r != SQL_SUCCESS)
+ ret = Mixed;//arbitrary case if driver cannot be queried
+ else {
+ switch (casing) {
+ case (SQL_IC_UPPER):
+ ret = Upper;
+ break;
+ case (SQL_IC_LOWER):
+ ret = Lower;
+ break;
+ case (SQL_IC_SENSITIVE):
+ ret = Sensitive;
+ break;
+ case (SQL_IC_MIXED):
+ default:
+ ret = Mixed;
+ break;
}
- isInitialized = true;
}
return ret;
}