* @brief Common registry implementation
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
#include <QObject>
#include <QString>
-#include <QPointer>
#include <QHash>
namespace eVaf {
* iRegistry interface implementation.
*
* This class implements the global registry for interfaces. Interfaces are stored in a QHash container
- * and quarded with QPointer.
+ * and quarded with QWeakPointer.
*/
class Registry : public iRegistry
{
private:
/// All the registered interfaces
- QHash<QString, QPointer<QObject> > mInterfaces;
+ typedef QHash<QString, QObject *> Interfaces;
+ Interfaces mInterfaces;
+
+
+private slots:
+
+ /// Interface object destroyed
+ /// We need to remove the interface from the list of registered interfaces
+ void interfaceDestroyed(QObject * obj = nullptr);
};