Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.4.0
-
None
Description
When using Com Objects with properties of type short cannot be set.
I get the warning "QAxBase::setProperty: Unhandled property type int"
The reason for this is IMHO the in the Function
QVariantToVARIANT in the File qaxtypes.cpp.
bool QVariantToVARIANT (..) { ... QVariant::Type proptype = typeName.isEmpty() ? QVariant::Invalid : QVariant::nameToType("short"); delivers proptype == QMetaType::Short so the following if statement if ((proptype == QVariant::UserType || proptype == int(QMetaType::QVariant)) && !typeName.isEmpty()) { if (typeName == "short" || typeName == "char") proptype = QVariant::Int; else if (typeName == "float") proptype = QVariant::Double; }
will not patch the proptype to QVariant::Int and qvar.type stays on QMetaType::Short causing the property is not set at all.
I assume the same problem will exist for char and float property types.
Added an example and the corresponding ocx
Attachments
For Gerrit Dashboard: QTBUG-45057 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
109006,4 | idc: Add support for char, uchar, short, ushort and float. | 5.5 | qt/qtactiveqt | Status: MERGED | +2 | 0 |
109007,4 | Add more types to QVariant->VARIANT conversion. | 5.5 | qt/qtactiveqt | Status: MERGED | -2 | 0 |
109104,2 | Fix signature of conversion functions. | 5.5 | qt/qtactiveqt | Status: MERGED | +2 | 0 |