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:
parent
c267017d4c
commit
1fc95e5214
@ -115,6 +115,7 @@ static void initDA(XSQLDA *sqlda)
|
|||||||
default:
|
default:
|
||||||
// not supported - do not bind.
|
// not supported - do not bind.
|
||||||
sqlda->sqlvar[i].sqldata = 0;
|
sqlda->sqlvar[i].sqldata = 0;
|
||||||
|
qCWarning(lcIbase, "initDA: unknown sqltype: %d", sqlda->sqlvar[i].sqltype & ~1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sqlda->sqlvar[i].sqltype & 1) {
|
if (sqlda->sqlvar[i].sqltype & 1) {
|
||||||
@ -205,8 +206,10 @@ static QMetaType::Type qIBaseTypeName2(int iType, bool hasScale)
|
|||||||
case SQL_BOOLEAN:
|
case SQL_BOOLEAN:
|
||||||
return QMetaType::Bool;
|
return QMetaType::Bool;
|
||||||
default:
|
default:
|
||||||
return QMetaType::UnknownType;
|
break;
|
||||||
}
|
}
|
||||||
|
qCWarning(lcIbase, "qIBaseTypeName: unknown datatype: %d", iType);
|
||||||
|
return QMetaType::UnknownType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ISC_TIMESTAMP toTimeStamp(const QDateTime &dt)
|
static ISC_TIMESTAMP toTimeStamp(const QDateTime &dt)
|
||||||
@ -1288,6 +1291,8 @@ bool QIBaseResult::gotoNext(QSqlCachedResult::ValueCache& row, int rowIdx)
|
|||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
// unknown type - don't even try to fetch
|
// unknown type - don't even try to fetch
|
||||||
|
qCWarning(lcIbase, "gotoNext: unknown sqltype: %d",
|
||||||
|
d->sqlda->sqlvar[i].sqltype & ~1);
|
||||||
row[idx] = QVariant();
|
row[idx] = QVariant();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user