← Back to team overview

ayatana-commits team mailing list archive

[Branch ~agateau/plasma-indicatordisplay/trunk] Rev 81: Indicator count is not stored in server items anymore, no need to test this.

 

------------------------------------------------------------
revno: 81
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: plasma-indicatordisplay
timestamp: Tue 2009-09-15 15:38:04 +0200
message:
  Indicator count is not stored in server items anymore, no need to test this.
modified:
  tests/listenermodeltest.cpp
  tests/listenermodeltest.h


--
lp:plasma-indicatordisplay
https://code.launchpad.net/~agateau/plasma-indicatordisplay/trunk

Your team ayatana-commits is subscribed to branch lp:plasma-indicatordisplay.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/plasma-indicatordisplay/trunk/+edit-subscription.
=== modified file 'tests/listenermodeltest.cpp'
--- tests/listenermodeltest.cpp	2009-09-14 16:23:19 +0000
+++ tests/listenermodeltest.cpp	2009-09-15 13:38:04 +0000
@@ -266,43 +266,4 @@
     QVERIFY(indicatorDrawAttention(indicatorIndex));
 }
 
-static int serverIndicatorCount(const QModelIndex& index)
-{
-    QVariant value = index.data(ListenerModel::IndicatorCountRole);
-    if (!value.canConvert(QVariant::Int)) {
-        return -1;
-    }
-    return value.toInt();
-}
-
-void ListenerModelTest::testIndicatorCount()
-{
-    // Show server
-    mServer->show();
-    QTest::qWait(500);
-    QModelIndex serverIndex = mModel->index(0, 0);
-
-    QCOMPARE(serverIndicatorCount(serverIndex), 0);
-
-    // Show an indicator
-    QIndicate::Indicator indicator1;
-    indicator1.show();
-    QTest::qWait(500);
-
-    QCOMPARE(serverIndicatorCount(serverIndex), 1);
-
-    // Show another one
-    QIndicate::Indicator indicator2;
-    indicator2.show();
-    QTest::qWait(500);
-
-    QCOMPARE(serverIndicatorCount(serverIndex), 2);
-
-    // Hide first one
-    indicator1.hide();
-    QTest::qWait(500);
-
-    QCOMPARE(serverIndicatorCount(serverIndex), 1);
-}
-
 #include "listenermodeltest.moc"

=== modified file 'tests/listenermodeltest.h'
--- tests/listenermodeltest.h	2009-08-07 17:00:25 +0000
+++ tests/listenermodeltest.h	2009-09-15 13:38:04 +0000
@@ -34,7 +34,6 @@
     void testAddIndicatorsAfterModel();
     void testGetProxiesFromIndex();
     void testUpdateIndicator();
-    void testIndicatorCount();
 
 private:
     QIndicate::Listener* mListener;