X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=src%2Flibs%2FCommon%2Fregistry.cpp;h=661d2c7d6717d2ad9bd1f43768a3679fb38b96d3;hb=8e0779e2e5a9f947f79c28e2ff121f6ffdd78b3f;hp=d93e469eaeea97185e39c9e61b7f9db0146fa261;hpb=7432726bf8e4fc75cf96d330380448edc593bb2e;p=evaf
diff --git a/src/libs/Common/registry.cpp b/src/libs/Common/registry.cpp
index d93e469..661d2c7 100644
--- a/src/libs/Common/registry.cpp
+++ b/src/libs/Common/registry.cpp
@@ -54,13 +54,13 @@ Registry::~Registry()
bool Registry::registerInterface(QString const & name, QObject * obj)
{
- mInterfaces.insert(name, QPointer(obj));
+ mInterfaces.insert(name, QWeakPointer(obj));
return true;
}
QObject * Registry::queryInterface(QString const & name) const
{
- QHash >::const_iterator it = mInterfaces.constFind(name);
- return it != mInterfaces.constEnd() ? *it : 0;
+ QHash >::const_iterator it = mInterfaces.constFind(name);
+ return it != mInterfaces.constEnd() ? (*it).data() : 0;
}