]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/eventqueue.h
Ported to Qt5
[evaf] / src / libs / Common / eventqueue.h
index b02937692129f83c74fc3151d392e7c70e180718..a4b834be5efef4ee253f50244cb1c983e0d428b4 100644 (file)
@@ -26,7 +26,6 @@
 #include <QString>
 #include <QHash>
 #include <QVector>
-#include <QWeakPointer>
 
 
 namespace eVaf {
@@ -72,10 +71,19 @@ private: // Members
     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 = 0);
 
 };