diff -r b72c6db6890b -r 5dc02b23752f src/sql/drivers/oci/qsql_oci.cpp --- a/src/sql/drivers/oci/qsql_oci.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/sql/drivers/oci/qsql_oci.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -56,6 +56,12 @@ #include #include +// This is needed for oracle oci when compiling with mingw-w64 headers +#if defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64) +#define _int64 __int64 +#endif + + #include #ifdef max #undef max @@ -364,8 +370,8 @@ value = qMakeDate(storage.takeFirst()); break; case QVariant::String: - value = QString::fromUtf16( - reinterpret_cast(storage.takeFirst().constData())); + value = QString( + reinterpret_cast(storage.takeFirst().constData())); break; default: break; //nothing @@ -454,7 +460,7 @@ OCI_HTYPE_ERROR); if (errorCode) *errorCode = errcode; - return QString::fromUtf16(reinterpret_cast(errbuf)); + return QString(reinterpret_cast(errbuf)); } void qOraWarning(const char* msg, OCIError *err) @@ -989,8 +995,7 @@ } else { if (isStringField) { QString str = values.at(fieldNum + index).toString(); - str += QString::fromUtf16(reinterpret_cast(col), - chunkSize / 2); + str += QString(reinterpret_cast(col), chunkSize / 2); values[fieldNum + index] = str; fieldInf[fieldNum].ind = 0; } else { @@ -1457,7 +1462,7 @@ break; case SQLT_STR: - (*list)[r] = QString::fromUtf16(reinterpret_cast(data + (*list)[r] = QString(reinterpret_cast(data + r * columns[i].maxLen)); break; @@ -1608,7 +1613,7 @@ } // else fall through case QVariant::String: - v[index + i] = QString::fromUtf16(reinterpret_cast(fld.data)); + v[index + i] = QString(reinterpret_cast(fld.data)); break; case QVariant::ByteArray: if (fld.len > 0) @@ -2102,7 +2107,7 @@ qWarning("QOCIDriver::open: could not get Oracle server version."); } else { QString versionStr; - versionStr = QString::fromUtf16(reinterpret_cast(vertxt)); + versionStr = QString(reinterpret_cast(vertxt)); QRegExp vers(QLatin1String("([0-9]+)\\.[0-9\\.]+[0-9]")); if (vers.indexIn(versionStr) >= 0) d->serverVersion = vers.cap(1).toInt();