Clean up objreg log text. This confused me in #159.

This commit is contained in:
Florian Bruhin 2014-10-07 22:21:51 +02:00
parent 4c29d1eafd
commit f3ad1b71e6

View File

@ -76,12 +76,12 @@ class ObjectRegistry(collections.UserDict):
be destroying its children, which might still use the object
registry.
"""
log.misc.debug("schedule destroyed: {}".format(name))
log.misc.debug("schedule removal: {}".format(name))
QTimer.singleShot(0, functools.partial(self._on_destroyed, name))
def _on_destroyed(self, name):
"""Remove a destroyed QObject."""
log.misc.debug("destroyed: {}".format(name))
log.misc.debug("removed: {}".format(name))
try:
del self[name]
except KeyError: