aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-07 23:20:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-07 23:20:59 +0200
commitb9a857b0fdcad47db958df635a5af934a8e90d62 (patch)
treea82bee72783db8f9063d857205972e71b1df3994 /sources/shiboken2/ApiExtractor/parser/codemodel.cpp
parent768541fb2e81a426daeffc2f81dcca42ecc43919 (diff)
parentd9f4a921ca88bf0bd340f42a874cf7c22b6b1a36 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.cpp11
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