diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-28 10:12:21 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-03 06:21:03 +0000 |
commit | 700ebd831f9ee7143c525bb936cd55f2a91adcc7 (patch) | |
tree | b85c51843208c856c6311de3658aced9dda4c94c /sources/shiboken2/generator | |
parent | 48fad87c14e6e09e01a66b7b1c4b62778a2268b1 (diff) |
Shiboken: Improve Handling of array types
Change the AbstractMetaType::signature() functions to work with the
nested AbstractMetaType types instead of TypeEntry so that the correct
array signatures appear in the signature of AbstractMetaFunction.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: I90aa11891c95ccdcbae81fb70db4bec0e62f5923
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/generator.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp index f60b195f2..a8e8735bb 100644 --- a/sources/shiboken2/generator/generator.cpp +++ b/sources/shiboken2/generator/generator.cpp @@ -515,9 +515,12 @@ bool Generator::isVoidPointer(const AbstractMetaType* type) QString Generator::getFullTypeName(const TypeEntry* type) const { - return type->isCppPrimitive() - ? type->qualifiedCppName() - : (QLatin1String("::") + type->qualifiedCppName()); + QString result = type->qualifiedCppName(); + if (type->isArray()) + type = static_cast<const ArrayTypeEntry *>(type)->nestedTypeEntry(); + if (!type->isCppPrimitive()) + result.prepend(QLatin1String("::")); + return result; } QString Generator::getFullTypeName(const AbstractMetaType* type) const |