-
Bug
-
Resolution: Done
-
P4: Low
-
5.4.0
-
None
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