diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-10-20 11:18:48 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-24 15:39:33 +0200 |
commit | 642fe4040b3b169b9377b6b5bad28a9189aefe2d (patch) | |
tree | 422b264fc9a91a3a9cb8c4db737ff45b53ca8988 | |
parent | 4bff8ea4d48851fbea078bd93226888bdd05d8dc (diff) |
Compile with clang
Clang does not accept this syntax, see
http://llvm.org/bugs/show_bug.cgi?id=8875
The work around is to not use the typedef name. NS() around the
template parameters is necessary to match the real types (and
not the QMetaType::Type enumerators), otherwise we get the following:
kernel/qmetatype.cpp:1647:72: error: template argument for template type
parameter must be a type
...NS(QVariantMap)* >(where)->NS(QVariantMap)::~QMap<QString, ...
^~~~~~~
Change-Id: I3afa0cbbe4ef7ad899cfa9eafb3bcc10bedc20b3
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 1d22d42d0f..3bf16cdebf 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -49,6 +49,7 @@ #include "qvector.h" #include "qlocale.h" #include "qeasingcurve.h" +#include "qvariant.h" #ifdef QT_BOOTSTRAPPED # ifndef QT_NO_GEOM_VARIANT @@ -1643,14 +1644,14 @@ void QMetaType::destruct(int type, void *where) break; #ifndef QT_BOOTSTRAPPED case QMetaType::QVariantMap: - static_cast< NS(QVariantMap)* >(where)->NS(QVariantMap)::~QVariantMap(); + static_cast< NS(QVariantMap)* >(where)->NS(QVariantMap)::~QMap<class QString, class QVariant>(); break; case QMetaType::QVariantHash: - static_cast< NS(QVariantHash)* >(where)->NS(QVariantHash)::~QVariantHash(); - break; - case QMetaType::QVariantList: - static_cast< NS(QVariantList)* >(where)->NS(QVariantList)::~QVariantList(); + static_cast< NS(QVariantHash)* >(where)->NS(QVariantHash)::~QHash<class QString, class QVariant>(); break; + case QMetaType::QVariantList: { + static_cast< NS(QVariantList)* >(where)->NS(QVariantList)::~QList<class QVariant>(); + break; } case QMetaType::QVariant: static_cast< NS(QVariant)* >(where)->NS(QVariant)::~QVariant(); break; |