From 463037d9bd5461218afe5fb5a5e4fe2d62923f20 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 20 Apr 2024 20:50:42 +0200 Subject: [PATCH] SQL/IBase: print warning in case of unsupported data type Print a warning when we encounter an unsupported data type. Pick-to: 6.7 6.5 Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2 Reviewed-by: Axel Spoerl --- src/plugins/sqldrivers/ibase/qsql_ibase.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp index 28361e250d..f7abb8718d 100644 --- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp +++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp @@ -118,6 +118,7 @@ static void initDA(XSQLDA *sqlda) default: // not supported - do not bind. sqlda->sqlvar[i].sqldata = 0; + qCWarning(lcIbase, "initDA: unknown sqltype: %d", sqlda->sqlvar[i].sqltype & ~1); break; } if (sqlda->sqlvar[i].sqltype & 1) { @@ -208,8 +209,10 @@ static QMetaType::Type qIBaseTypeName2(int iType, bool hasScale) case SQL_BOOLEAN: return QMetaType::Bool; default: - return QMetaType::UnknownType; + break; } + qCWarning(lcIbase, "qIBaseTypeName: unknown datatype: %d", iType); + return QMetaType::UnknownType; } static ISC_TIMESTAMP toTimeStamp(const QDateTime &dt) @@ -1291,6 +1294,8 @@ bool QIBaseResult::gotoNext(QSqlCachedResult::ValueCache& row, int rowIdx) #endif default: // unknown type - don't even try to fetch + qCWarning(lcIbase, "gotoNext: unknown sqltype: %d", + d->sqlda->sqlvar[i].sqltype & ~1); row[idx] = QVariant(); break; }