From fc50d7ecaacfbfef1dbefd6ffdc083cb66c5633c Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 30 Sep 2010 13:45:00 +0200 Subject: QAxBase::dynamicCall() returns invalid QVariant Starting from 4.7.0, QVariant is recognized as a standard type by the meta type system. ActiveQt needs to consider this while converting COM VARIANT types to a QVariant. Task-number: QTBUG-13845 Reviewed-by: Volker Hilsheimer Reviewed-by: Olivier Goffart --- src/activeqt/shared/qaxtypes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 957733e..ff21a9f 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -1376,8 +1376,10 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint } QVariant::Type proptype = (QVariant::Type)type; - if (proptype == QVariant::Invalid && !typeName.isEmpty()) - proptype = QVariant::nameToType(typeName); + if (proptype == QVariant::Invalid && !typeName.isEmpty()) { + if (typeName != "QVariant") + proptype = QVariant::nameToType(typeName); + } if (proptype != QVariant::LastType && proptype != QVariant::Invalid && var.type() != proptype) { if (var.canConvert(proptype)) { QVariant oldvar = var; -- cgit v0.12