diff options
| -rw-r--r-- | sources/shiboken2/ApiExtractor/parser/codemodel.cpp | 29 | ||||
| -rw-r--r-- | sources/shiboken2/ApiExtractor/parser/codemodel.h | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp index 4fafa0c2c..fdf2af872 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp @@ -393,6 +393,33 @@ void TypeInfo::simplifyStdType() } } +void TypeInfo::formatTypeSystemSignature(QTextStream &str) const +{ + if (m_constant) + str << "const "; + str << m_qualifiedName.join(QLatin1String("::")); + switch (m_referenceType) { + case NoReference: + break; + case LValueReference: + str << '&'; + break; + case RValueReference: + str << "&&"; + break; + } + for (auto i : m_indirections) { + switch (i) { + case Indirection::Pointer: + str << '*'; + break; + case Indirection::ConstPointer: + str << "* const"; + break; + } + } +} + #ifndef QT_NO_DEBUG_STREAM template <class It> void formatSequence(QDebug &d, It i1, It i2, const char *separator=", ") @@ -1135,7 +1162,7 @@ QString _FunctionModelItem::typeSystemSignature() const // For dumping out type for (int a = 0, size = m_arguments.size(); a < size; ++a) { if (a) str << ','; - str << m_arguments.at(a)->type().qualifiedName().join(QLatin1String("::")); + m_arguments.at(a)->type().formatTypeSystemSignature(str); } str << ')'; return result; diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h index e851c9c8e..57b393f91 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.h +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h @@ -202,6 +202,8 @@ public: static TypeInfo combine(const TypeInfo &__lhs, const TypeInfo &__rhs); static TypeInfo resolveType(TypeInfo const &__type, const ScopeModelItem &__scope); + void formatTypeSystemSignature(QTextStream &str) const; + #ifndef QT_NO_DEBUG_STREAM void formatDebug(QDebug &d) const; #endif |
