X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Feventqueue.h;h=730801bae2d5b7fe2a9deff41d53e393f206f1da;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=92bcb06da4fa2e7920be2223018aaa085bd57a02;hpb=5815060246f84e8efdf3143b4e8c7d00778168cf;p=evaf
diff --git a/src/libs/Common/eventqueue.h b/src/libs/Common/eventqueue.h
index 92bcb06..730801b 100644
--- a/src/libs/Common/eventqueue.h
+++ b/src/libs/Common/eventqueue.h
@@ -3,7 +3,7 @@
* @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.
*
@@ -25,8 +25,7 @@
#include
#include
#include
-#include
-#include
+#include
namespace eVaf {
@@ -72,10 +71,19 @@ private: // Members
uint mNextEventId;
/// List of registered events
- QHash mEvents;
+ typedef QHash Events;
+ Events mEvents;
/// List of subscribers
- QHash > > mSubscribers;
+ typedef QHash > 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);
};