summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-12-11 11:28:41 +0100
committerAndy Shaw <andy.shaw@qt.io>2020-12-13 12:10:28 +0100
commit7b391c0d2c03d8d25449eca3868cd010d75ff81e (patch)
tree58f4ca33a5e5c24156967c4b523bc752e9cea3fe /src/plugins/sqldrivers
parent37917b94615ee448101a38ba9f589fd992716a63 (diff)
OCI: Fix the compilation of the plugin
Pick-to: 6.0 Change-Id: I9637bab6cc217d4fd9692f6745b4f14db6ffb259 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp
index 9659427c7c..1566428f26 100644
--- a/src/plugins/sqldrivers/oci/qsql_oci.cpp
+++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp
@@ -543,7 +543,7 @@ static void qOraOutValue(QVariant &value, TempStorage &tmpStorage, OCIEnv *env,
case QMetaType::ULongLong:
value = qMakeULongLong(tmpStorage.rawData.takeFirst(), err);
break;
- case QMetaType::String:
+ case QMetaType::QString:
value = QString(
reinterpret_cast<const QChar *>(tmpStorage.rawData.takeFirst().constData()));
break;
@@ -878,7 +878,7 @@ QOCICols::OraFieldInf::~OraFieldInf()
qWarning("QOCICols: Cannot free LOB descriptor");
}
if (dataPtr) {
- switch (typ) {
+ switch (typ.id()) {
case QMetaType::QDate:
case QMetaType::QTime:
case QMetaType::QDateTime: {
@@ -1444,7 +1444,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
case QMetaType::QByteArray:
default: {
- if (fieldTypes[i].typeId() >= QMetaType::User) {
+ if (fieldTypes[i].id() >= QMetaType::User) {
col.bindAs = SQLT_RDD;
col.maxLen = sizeof(OCIRowid*);
} else {
@@ -1459,6 +1459,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
}
}
break;
+ }
}
col.data = new char[col.maxLen * col.recordCount];
@@ -1826,7 +1827,7 @@ void QOCICols::getValues(QVariantList &v, int index)
if (fld.len > 0)
v[index + i] = QByteArray(fld.data, fld.len);
else
- v[index + i] = QVariant(QMetaType::QByteArray);
+ v[index + i] = QVariant(QMetaType(QMetaType::QByteArray));
break;
default:
qWarning("QOCICols::value: unknown data type");
@@ -2702,7 +2703,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const
QString QOCIDriver::formatValue(const QSqlField &field, bool trimStrings) const
{
- switch (field.typeId()) {
+ switch (field.typeID()) {
case QMetaType::QDateTime: {
QDateTime datetime = field.value().toDateTime();
QString datestring;