diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-30 11:45:00 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-10-01 04:46:49 (GMT) |
commit | 5efa6ff7ca33d2dca14418ac8ffb49b69e2e2452 (patch) | |
tree | 188c8de02157cbab90b0bfe0a9c6e317f512a260 | |
parent | f9312fec1c44097a2093b3075aa68901327eb9c5 (diff) | |
download | Qt-5efa6ff7ca33d2dca14418ac8ffb49b69e2e2452.zip Qt-5efa6ff7ca33d2dca14418ac8ffb49b69e2e2452.tar.gz Qt-5efa6ff7ca33d2dca14418ac8ffb49b69e2e2452.tar.bz2 |
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
(cherry picked from commit fc50d7ecaacfbfef1dbefd6ffdc083cb66c5633c)
-rw-r--r-- | src/activeqt/shared/qaxtypes.cpp | 6 |
1 files 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; |