Note to self: a QSet is not ordered.
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 12 Oct 2008 16:33:32 +0000 (18:33 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 12 Oct 2008 18:38:43 +0000 (20:38 +0200)
src/qtui/qtui.cpp
src/qtui/qtui.h

index 0b8d3e6..8cb8347 100644 (file)
@@ -32,7 +32,7 @@
 
 ActionCollection *QtUi::_actionCollection = 0;
 MainWin *QtUi::_mainWin = 0;
-QSet<AbstractNotificationBackend *> QtUi::_notificationBackends;
+QList<AbstractNotificationBackend *> QtUi::_notificationBackends;
 QList<AbstractNotificationBackend::Notification> QtUi::_notifications;
 QtUiStyle *QtUi::_style = 0;
 
@@ -81,19 +81,19 @@ void QtUi::disconnectedFromCore() {
 
 void QtUi::registerNotificationBackend(AbstractNotificationBackend *backend) {
   if(!_notificationBackends.contains(backend)) {
-    _notificationBackends.insert(backend);
+    _notificationBackends.append(backend);
   }
 }
 
 void QtUi::unregisterNotificationBackend(AbstractNotificationBackend *backend) {
-  _notificationBackends.remove(backend);
+  _notificationBackends.removeAll(backend);
 }
 
 void QtUi::unregisterAllNotificationBackends() {
   _notificationBackends.clear();
 }
 
-const QSet<AbstractNotificationBackend *> &QtUi::notificationBackends() {
+const QList<AbstractNotificationBackend *> &QtUi::notificationBackends() {
   return _notificationBackends;
 }
 
index db06409..1fe1114 100644 (file)
@@ -60,7 +60,7 @@ public:
   static void registerNotificationBackend(AbstractNotificationBackend *);
   static void unregisterNotificationBackend(AbstractNotificationBackend *);
   static void unregisterAllNotificationBackends();
-  static const QSet<AbstractNotificationBackend *> &notificationBackends();
+  static const QList<AbstractNotificationBackend *> &notificationBackends();
   static uint invokeNotification(BufferId bufId, const QString &sender, const QString &text);
   static void closeNotification(uint notificationId);
   static void closeNotifications(BufferId bufferId = BufferId());
@@ -77,7 +77,7 @@ private:
   static MainWin *_mainWin;
   static ActionCollection *_actionCollection;
   static QtUiStyle *_style;
-  static QSet<AbstractNotificationBackend *> _notificationBackends;
+  static QList<AbstractNotificationBackend *> _notificationBackends;
   static QList<AbstractNotificationBackend::Notification> _notifications;
 };