aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-06 13:41:12 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-06 13:48:58 +0200
commitd2d0e397309a1b18eaff9ddee0940007f0e1c4bf (patch)
tree44c546ecab40886af6dd3b12b1d024be2833b6b3 /sources/shiboken2
parentbe92136910f88c3fb6f2d1810e702fcf5e7cd25a (diff)
shiboken: Disambiguate indexes of smart pointer types
Add the module name like it is done for namespaces and containers. Task-number: PYSIDE-1024 Change-Id: Iba8589bfe360763bc186e5129d0ba480b2fb58ae Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 2b3b20c75..5d599fe95 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2681,8 +2681,11 @@ QString ShibokenGenerator::getTypeIndexVariableName(const TypeEntry* type)
QString ShibokenGenerator::getTypeIndexVariableName(const AbstractMetaType* type)
{
QString result = QLatin1String("SBK");
- if (type->typeEntry()->isContainer())
+ const auto *typeEntry = type->typeEntry();
+ if (typeEntry->isContainer()
+ || typeEntry->isSmartPointer()) { // PYSIDE-1024
result += QLatin1Char('_') + moduleName().toUpper();
+ }
result += processInstantiationsVariableName(type);
appendIndexSuffix(&result);
return result;