Add docstrings to signal debugging.
This commit is contained in:
parent
bcf8040041
commit
ef8873040a
@ -51,10 +51,12 @@ def log_signals(obj):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def log_slot(obj, signal, *args):
|
def log_slot(obj, signal, *args):
|
||||||
|
"""Slot connected to a signal to log it."""
|
||||||
dbg = dbg_signal(signal, args)
|
dbg = dbg_signal(signal, args)
|
||||||
log.misc.debug("Signal in {}: {}".format(repr(obj), dbg))
|
log.misc.debug("Signal in {}: {}".format(repr(obj), dbg))
|
||||||
|
|
||||||
def connect_log_slot(obj):
|
def connect_log_slot(obj):
|
||||||
|
"""Helper function to connect all signals to a logging slot."""
|
||||||
metaobj = obj.metaObject()
|
metaobj = obj.metaObject()
|
||||||
for i in range(metaobj.methodCount()):
|
for i in range(metaobj.methodCount()):
|
||||||
meta_method = metaobj.method(i)
|
meta_method = metaobj.method(i)
|
||||||
|
Loading…
Reference in New Issue
Block a user