mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
8422b844b1
- preserve the reference count of arguments passed to wrapped functions - don't dump all over the stack of functions that call PythonQtConv::ConvertPythonToQt - convert :: to _ in value type names
26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
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);
|