* @brief Event queue interface 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 <QString>
#include <QHash>
#include <QVector>
-#include <QWeakPointer>
namespace eVaf {
uint mNextEventId;
/// List of registered events
- QHash<uint, QString> mEvents;
+ typedef QHash<uint, QString> Events;
+ Events mEvents;
/// List of subscribers
- QHash<uint, QVector<QWeakPointer<QObject> > > mSubscribers;
+ typedef QHash<uint, QVector<QObject *> > Subscribers;
+ Subscribers mSubscribers;
+
+
+private slots:
+
+ /// One of the subscribers is destroyed
+ /// We need to remove it from the list of subscribers.
+ void subscriberDestroyed(QObject * obj = nullptr);
};