diff --git a/3rdparty/pythonqt/src/PythonQt.cpp b/3rdparty/pythonqt/src/PythonQt.cpp index f97bdf1..53cd197 100644 --- a/3rdparty/pythonqt/src/PythonQt.cpp +++ b/3rdparty/pythonqt/src/PythonQt.cpp @@ -1144,14 +1144,17 @@ bool PythonQtPrivate::addParentClass(const char* typeName, const char* parentTyp void PythonQtPrivate::registerCPPClass(const char* typeName, const char* parentTypeName, const char* package, PythonQtQObjectCreatorFunctionCB* wrapperCreator, PythonQtShellSetInstanceWrapperCB* shell, PyObject* module, int typeSlots) { - PythonQtClassInfo* info = lookupClassInfoAndCreateIfNotPresent(typeName); + QByteArray typeNameCopy(typeName); + typeNameCopy.replace("::", "_"); + + PythonQtClassInfo* info = lookupClassInfoAndCreateIfNotPresent(typeNameCopy); if (!info->pythonQtClassWrapper()) { info->setTypeSlots(typeSlots); - info->setupCPPObject(typeName); + info->setupCPPObject(typeNameCopy); createPythonQtClassWrapper(info, package, module); } if (parentTypeName && strcmp(parentTypeName,"")!=0) { - addParentClass(typeName, parentTypeName, 0); + addParentClass(typeNameCopy, parentTypeName, 0); } if (wrapperCreator) { info->setDecoratorProvider(wrapperCreator);