diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-07 23:20:59 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-07 23:20:59 +0200 |
commit | b9a857b0fdcad47db958df635a5af934a8e90d62 (patch) | |
tree | a82bee72783db8f9063d857205972e71b1df3994 /sources/shiboken2/ApiExtractor/parser/codemodel.cpp | |
parent | 768541fb2e81a426daeffc2f81dcca42ecc43919 (diff) | |
parent | d9f4a921ca88bf0bd340f42a874cf7c22b6b1a36 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I920a77a3a8c79bba0fd7e5e4f990facf4081ca08
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/parser/codemodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp index eb0f44689..7bb7e0a83 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp @@ -353,6 +353,17 @@ bool TypeInfo::stripLeadingQualifier(const QString &qualifier, QString *s) return true; } +// Strip all const/volatile/*/& +void TypeInfo::stripQualifiers(QString *s) +{ + stripLeadingConst(s); + stripLeadingVolatile(s); + while (s->endsWith(QLatin1Char('&')) || s->endsWith(QLatin1Char('*')) + || s->endsWith(QLatin1Char(' '))) { + s->chop(1); + } +} + // Helper functionality to simplify a raw standard type as returned by // clang_getCanonicalType() for g++ standard containers from // "std::__cxx11::list<int, std::allocator<int> >" or |