aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/generator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-06 12:51:24 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-06 16:12:35 +0200
commitfd126b28e1d9b02ea16c813bc392461bdb05bd1d (patch)
tree63066d241027f67dcf58132dad4d70226af7a2a3 /sources/shiboken2/generator/generator.cpp
parentf7f12ba7f277d4c074382b5434123dc66b8791b8 (diff)
shiboken: Fix generation of init functions and types for const-refs of smart pointers
Add a convenience to strip all qualifiers and use that. This at least fixes the naming (for example, getInitFunctionName returning "const_QSharedPointer_QSize___&"), the init function for the type itself is missing, though. Task-number: PYSIDE-1016 Change-Id: Id61b3c879199fc061e2846007951e3e9c82b85c4 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator/generator.cpp')
-rw-r--r--sources/shiboken2/generator/generator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp
index 87758e533..fe03d3489 100644
--- a/sources/shiboken2/generator/generator.cpp
+++ b/sources/shiboken2/generator/generator.cpp
@@ -28,6 +28,7 @@
#include "generator.h"
#include "abstractmetalang.h"
+#include "parser/codemodel.h"
#include "messages.h"
#include "reporthandler.h"
#include "fileout.h"
@@ -911,6 +912,7 @@ QString getClassTargetFullName(const AbstractMetaType *metaType, bool includePac
QString getFilteredCppSignatureString(QString signature)
{
+ TypeInfo::stripQualifiers(&signature); // for const refs to smart pointers
signature.replace(QLatin1String("::"), QLatin1String("_"));
signature.replace(QLatin1Char('<'), QLatin1Char('_'));
signature.replace(QLatin1Char('>'), QLatin1Char('_'));