Add object registry support to command handler.

This commit is contained in:
Florian Bruhin 2014-09-23 19:08:39 +02:00
parent 10eb849ae7
commit ab95234dad

View File

@ -304,7 +304,11 @@ class Command:
app = QCoreApplication.instance()
if self.instance == '':
obj = app
elif self.instance in app.registry:
# Use object registry where available
obj = app.registry[self.instance]
else:
# FIXME remove this
obj = utils.dotted_getattr(app, self.instance)
args.append(obj)