+ // Add the interface to the list of registered interfaces and connect to
+ // the destroyed() signal.
+ mInterfaces.insert(name, obj);
+ connect(obj, SIGNAL(destroyed(QObject *)), this, SLOT(interfaceDestroyed(QObject *)));
+
+ return true;
+}
+
+QObject * Registry::queryInterface(QString const & name) const
+{
+ Interfaces::const_iterator it = mInterfaces.constFind(name);
+ return it != mInterfaces.constEnd() ? *it : nullptr;