aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-27 08:57:33 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-27 13:04:12 +0100
commitd43163af9c5630aeef67a2494e72009bc18077bb (patch)
tree2da4f490e4cf4838a6a4ee48a76d3591416dc516
parent8fc33607461cdb697ba607ac3d74dd37c14479e6 (diff)
shiboken6: Fix module names of opaque containers
Include the package name. Pick-to: 6.4 Fixes: PYSIDE-2239 Change-Id: I7277b94c780742000da71085a5e385f343b5c6f9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator_container.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator_container.cpp b/sources/shiboken6/generator/shiboken/cppgenerator_container.cpp
index 360ae703d..a9bec406d 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator_container.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator_container.cpp
@@ -7,6 +7,7 @@
#include "ctypenames.h"
#include "containertypeentry.h"
#include "textstream.h"
+#include "typedatabase.h"
#include <QtCore/QDebug>
@@ -191,7 +192,8 @@ CppGenerator::OpaqueContainerData
// spec
const QString specName = result.name + u"_spec"_s;
- const QString name = moduleName() + u'.' + result.name;
+ const QString name = TypeDatabase::instance()->defaultPackageName()
+ + u'.' + result.name;
s << "static PyType_Spec " << specName << " = {\n" << indent
<< "\"" << name.count(u'.') << ':' << name << "\",\n"
<< "sizeof(ShibokenContainer),\n0,\nPy_TPFLAGS_DEFAULT,\n"