SQL/OCI: fix QOCIDriver::formatValue()

The switch needs to be on QSqlField::metaType() instead the internal
QSqlField::typeID() which holds the db-specific type of this field.

This amends 7b391c0d2c03d8d25449eca3868cd010d75ff81e.

Pick-to: 6.6 6.5 6.2
Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 55d1480c9992b52c39906b3861a3e2e7f7bed898)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-01-26 17:00:31 +01:00 committed by Qt Cherry-pick Bot
parent 979f6b4eb3
commit a1c6bb8030

View File

@ -2684,7 +2684,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const
QString QOCIDriver::formatValue(const QSqlField &field, bool trimStrings) const
{
switch (field.typeID()) {
switch (field.metaType().id()) {
case QMetaType::QDateTime: {
QDateTime datetime = field.value().toDateTime();
QString datestring;