mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 04:19:55 +01:00
Clean up PythonQtSignalReceivers properly, fixing a segfault on exit of the python test
This commit is contained in:
parent
c80f29de82
commit
cd052f4619
20
3rdparty/pythonqt/patches/cleanup-signal-receivers.patch
vendored
Normal file
20
3rdparty/pythonqt/patches/cleanup-signal-receivers.patch
vendored
Normal file
@ -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<QByteArray, PythonQtClassInfo *> 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();
|
9
3rdparty/pythonqt/src/PythonQt.cpp
vendored
9
3rdparty/pythonqt/src/PythonQt.cpp
vendored
@ -200,12 +200,9 @@ PythonQtPrivate::~PythonQtPrivate() {
|
|||||||
delete _defaultImporter;
|
delete _defaultImporter;
|
||||||
_defaultImporter = NULL;
|
_defaultImporter = NULL;
|
||||||
|
|
||||||
{
|
qDeleteAll(_knownClassInfos.values());
|
||||||
QHashIterator<QByteArray, PythonQtClassInfo *> i(_knownClassInfos);
|
qDeleteAll(_signalReceivers.values());
|
||||||
while (i.hasNext()) {
|
|
||||||
delete i.next().value();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PythonQtConv::global_valueStorage.clear();
|
PythonQtConv::global_valueStorage.clear();
|
||||||
PythonQtConv::global_ptrStorage.clear();
|
PythonQtConv::global_ptrStorage.clear();
|
||||||
PythonQtConv::global_variantStorage.clear();
|
PythonQtConv::global_variantStorage.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user