1
0
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:
David Sansome 2011-05-30 18:56:27 +00:00
parent c80f29de82
commit cd052f4619
2 changed files with 23 additions and 6 deletions

View 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();

View File

@ -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();