OCI: Fix the compilation of the plugin
Change-Id: I9637bab6cc217d4fd9692f6745b4f14db6ffb259 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 7b391c0d2c03d8d25449eca3868cd010d75ff81e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9b3e80cd87
commit
622a5dc603
@ -543,7 +543,7 @@ static void qOraOutValue(QVariant &value, TempStorage &tmpStorage, OCIEnv *env,
|
|||||||
case QMetaType::ULongLong:
|
case QMetaType::ULongLong:
|
||||||
value = qMakeULongLong(tmpStorage.rawData.takeFirst(), err);
|
value = qMakeULongLong(tmpStorage.rawData.takeFirst(), err);
|
||||||
break;
|
break;
|
||||||
case QMetaType::String:
|
case QMetaType::QString:
|
||||||
value = QString(
|
value = QString(
|
||||||
reinterpret_cast<const QChar *>(tmpStorage.rawData.takeFirst().constData()));
|
reinterpret_cast<const QChar *>(tmpStorage.rawData.takeFirst().constData()));
|
||||||
break;
|
break;
|
||||||
@ -878,7 +878,7 @@ QOCICols::OraFieldInf::~OraFieldInf()
|
|||||||
qWarning("QOCICols: Cannot free LOB descriptor");
|
qWarning("QOCICols: Cannot free LOB descriptor");
|
||||||
}
|
}
|
||||||
if (dataPtr) {
|
if (dataPtr) {
|
||||||
switch (typ) {
|
switch (typ.id()) {
|
||||||
case QMetaType::QDate:
|
case QMetaType::QDate:
|
||||||
case QMetaType::QTime:
|
case QMetaType::QTime:
|
||||||
case QMetaType::QDateTime: {
|
case QMetaType::QDateTime: {
|
||||||
@ -1444,7 +1444,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
|
|||||||
|
|
||||||
case QMetaType::QByteArray:
|
case QMetaType::QByteArray:
|
||||||
default: {
|
default: {
|
||||||
if (fieldTypes[i].typeId() >= QMetaType::User) {
|
if (fieldTypes[i].id() >= QMetaType::User) {
|
||||||
col.bindAs = SQLT_RDD;
|
col.bindAs = SQLT_RDD;
|
||||||
col.maxLen = sizeof(OCIRowid*);
|
col.maxLen = sizeof(OCIRowid*);
|
||||||
} else {
|
} else {
|
||||||
@ -1459,6 +1459,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
col.data = new char[col.maxLen * col.recordCount];
|
col.data = new char[col.maxLen * col.recordCount];
|
||||||
@ -1826,7 +1827,7 @@ void QOCICols::getValues(QVariantList &v, int index)
|
|||||||
if (fld.len > 0)
|
if (fld.len > 0)
|
||||||
v[index + i] = QByteArray(fld.data, fld.len);
|
v[index + i] = QByteArray(fld.data, fld.len);
|
||||||
else
|
else
|
||||||
v[index + i] = QVariant(QMetaType::QByteArray);
|
v[index + i] = QVariant(QMetaType(QMetaType::QByteArray));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qWarning("QOCICols::value: unknown data type");
|
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
|
QString QOCIDriver::formatValue(const QSqlField &field, bool trimStrings) const
|
||||||
{
|
{
|
||||||
switch (field.typeId()) {
|
switch (field.typeID()) {
|
||||||
case QMetaType::QDateTime: {
|
case QMetaType::QDateTime: {
|
||||||
QDateTime datetime = field.value().toDateTime();
|
QDateTime datetime = field.value().toDateTime();
|
||||||
QString datestring;
|
QString datestring;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user