← Back to team overview

ayatana-commits team mailing list archive

[Branch ~agateau/plasma-widget-message-indicator/trunk] Rev 114: One can't create multiple listeners with libindicate 0.3

 

------------------------------------------------------------
revno: 114
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: plasma-widget-message-indicator
timestamp: Tue 2010-02-16 11:24:34 +0100
message:
  One can't create multiple listeners with libindicate 0.3
modified:
  tests/filtermodeltest.cpp


--
lp:plasma-widget-message-indicator
https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk

Your team ayatana-commits is subscribed to branch lp:plasma-widget-message-indicator.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk/+edit-subscription.
=== modified file 'tests/filtermodeltest.cpp'
--- tests/filtermodeltest.cpp	2009-09-28 09:06:26 +0000
+++ tests/filtermodeltest.cpp	2010-02-16 10:24:34 +0000
@@ -54,20 +54,23 @@
     indicator.show();
     QTest::qWait(500);
 
+    QModelIndex serverIndex;
+    QIndicate::Listener listener;
+
+    // FIXME: ListenerModel can't list servers or indicators which have already
+    // been received by Listener, so this does not work for now
+    #if 0
     // Create a ListenerModel with a wrong server type
-    QIndicate::Listener listener1;
-    ListenerModel listenerModel1(&listener1, QRegExp("^foo"));
+    ListenerModel listenerModel1(&listener, QRegExp("^foo"));
 
     // We should not find any index
     QTest::qWait(500);
-    QModelIndex serverIndex = listenerModel1.index(0, 0);
+    serverIndex = listenerModel1.index(0, 0);
     QVERIFY(!serverIndex.isValid());
+    #endif
 
-    // FIXME: ListenerModel can't list servers or indicators which have already
-    // been received by Listener, so we create another instance of Listener
     // Create a ListenerModel with the correct server type
-    QIndicate::Listener listener2;
-    ListenerModel listenerModel2(&listener2, QRegExp('^' + SERVER_TYPE));
+    ListenerModel listenerModel2(&listener, QRegExp('^' + SERVER_TYPE));
 
     // We should see the server and its indicator now
     QTest::qWait(500);