From 7bdc8d43fcc0b4b28c1060543dd8c180d97c7228 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 26 Jan 2024 17:00:31 +0100 Subject: [PATCH] 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.5 6.2 Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046 Reviewed-by: Andy Shaw (cherry picked from commit 55d1480c9992b52c39906b3861a3e2e7f7bed898) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit a1c6bb803073e86b71552954c6d9591f59388549) --- src/plugins/sqldrivers/oci/qsql_oci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp index 1a9eb041b30..9bacec3845d 100644 --- a/src/plugins/sqldrivers/oci/qsql_oci.cpp +++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp @@ -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;