SQL/IBase: print warning in case of unsupported data type

Print a warning when we encounter an unsupported data type.

Pick-to: 6.5
Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 463037d9bd5461218afe5fb5a5e4fe2d62923f20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-04-20 20:50:42 +02:00 committed by Qt Cherry-pick Bot
parent c267017d4c
commit 1fc95e5214

View File

@ -115,6 +115,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) {
@ -205,8 +206,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)
@ -1288,6 +1291,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;
}