diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-07 15:18:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-07 15:18:37 +0200 |
commit | 41b864397ab9f999a7b140b12d2117b8492ed066 (patch) | |
tree | 3b4d20a6fc4ea61fa6b1eabe0e8a955dcec176c6 /sources/shiboken2/ApiExtractor/parser/codemodel.cpp | |
parent | 4c4fdca8ee3ee3807dd3d56876cfcc1ea1a8cac8 (diff) | |
parent | a90adae275cef10dd75b8fc19bc97a7cb59c43dc (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9072902ff4efa3469b044b26ed189ac05bf9ce33
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 |