Don't connect destroyed signal in log_signals.

This causes weird segfaults and is probably not that important to log.

Fixes #867.
This commit is contained in:
Florian Bruhin 2015-08-11 14:29:06 +02:00
parent 7412e4f723
commit 10298e9692

View File

@ -68,8 +68,9 @@ def log_signals(obj):
qtutils.ensure_valid(meta_method)
if meta_method.methodType() == QMetaMethod.Signal:
name = bytes(meta_method.name()).decode('ascii')
signal = getattr(obj, name)
signal.connect(functools.partial(log_slot, obj, signal))
if name != 'destroyed':
signal = getattr(obj, name)
signal.connect(functools.partial(log_slot, obj, signal))
if inspect.isclass(obj):
old_init = obj.__init__