From 578188ee7899bfabc5ab45758f59acafaa26cc8c Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 1 Apr 2009 15:51:17 +0200 Subject: Wrong property type (QVariant&) generated by ActiveQt This was due to an incorrect type defenition in the typelibrary for a particular COM object. Enven in such cases we should not generate an incorrect type. Task-number: 248612 Reviewed-by: Volker Hilsheimer --- src/activeqt/container/qaxbase.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 1ec704a..44c3e9e 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -1660,11 +1660,15 @@ private: QMap property_list; void addProperty(const QByteArray &type, const QByteArray &name, uint flags) { + QByteArray propertyType(type); + if (propertyType.endsWith("&")) + propertyType.chop(1); + Property &prop = property_list[name]; - if (!type.isEmpty() && type != "HRESULT") { - prop.type = replaceType(type); - if (prop.type != type) - prop.realType = type; + if (!propertyType.isEmpty() && propertyType != "HRESULT") { + prop.type = replaceType(propertyType); + if (prop.type != propertyType) + prop.realType = propertyType; } if (flags & Writable) flags |= Stored; -- cgit v0.12