diff --git a/3rdparty/pythonqt/patches/cleanup-signal-receivers.patch b/3rdparty/pythonqt/patches/cleanup-signal-receivers.patch new file mode 100644 index 000000000..0f50f3086 --- /dev/null +++ b/3rdparty/pythonqt/patches/cleanup-signal-receivers.patch @@ -0,0 +1,20 @@ +diff --git a/3rdparty/pythonqt/src/PythonQt.cpp b/3rdparty/pythonqt/src/PythonQt.cpp +index f97bdf1..dfde7a0 100644 +--- a/3rdparty/pythonqt/src/PythonQt.cpp ++++ b/3rdparty/pythonqt/src/PythonQt.cpp +@@ -200,12 +200,9 @@ PythonQtPrivate::~PythonQtPrivate() { + delete _defaultImporter; + _defaultImporter = NULL; + +- { +- QHashIterator i(_knownClassInfos); +- while (i.hasNext()) { +- delete i.next().value(); +- } +- } ++ qDeleteAll(_knownClassInfos.values()); ++ qDeleteAll(_signalReceivers.values()); ++ + PythonQtConv::global_valueStorage.clear(); + PythonQtConv::global_ptrStorage.clear(); + PythonQtConv::global_variantStorage.clear(); diff --git a/3rdparty/pythonqt/src/PythonQt.cpp b/3rdparty/pythonqt/src/PythonQt.cpp index f97bdf1b1..dfde7a028 100644 --- a/3rdparty/pythonqt/src/PythonQt.cpp +++ b/3rdparty/pythonqt/src/PythonQt.cpp @@ -200,12 +200,9 @@ PythonQtPrivate::~PythonQtPrivate() { delete _defaultImporter; _defaultImporter = NULL; - { - QHashIterator i(_knownClassInfos); - while (i.hasNext()) { - delete i.next().value(); - } - } + qDeleteAll(_knownClassInfos.values()); + qDeleteAll(_signalReceivers.values()); + PythonQtConv::global_valueStorage.clear(); PythonQtConv::global_ptrStorage.clear(); PythonQtConv::global_variantStorage.clear();