Forgot to update openPanel() method call to tabbed panel test
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Mon, 30 Aug 2010 08:19:53 +0000 (11:19 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Mon, 30 Aug 2010 08:19:53 +0000 (11:19 +0300)
tests/ui/tabbedpanel/testtabbedpanel.cpp

index 1827f10..5a58036 100644 (file)
@@ -41,9 +41,9 @@ void TestTabbedPanel::testPanelToggling()
     PanelBase *testPanel = new PanelBase;
     testTabbedPanel->addTab(testPanel, QIcon(":/res/images/user_info.png"));
 
-    QSignalSpy closedSpy(testPanel, SIGNAL(panelClosed()));
-    QSignalSpy openedSpy(testPanel, SIGNAL(panelOpened()));
-    QSignalSpy toggleSpy(testPanel, SIGNAL(toggleState()));
+    QSignalSpy closedSpy(testTabbedPanel, SIGNAL(panelClosed()));
+    QSignalSpy openedSpy(testTabbedPanel, SIGNAL(panelOpened()));
+    QSignalSpy toggleSpy(testTabbedPanel, SIGNAL(toggleState()));
 
     // Check that everything is initialized properly
     QVERIFY(closedSpy.isValid());
@@ -67,7 +67,7 @@ void TestTabbedPanel::testPanelToggling()
     QCOMPARE(toggleSpy.count(), 0);
 
     // Now try to open the panel, only toggleState and panelOpened signals should be sent
-    testTabbedPanel->showPanel(testPanel);
+    testTabbedPanel->openPanel(testPanel);
     QTest::qWait(1);
     QCOMPARE(closedSpy.count(), 0);
     QCOMPARE(openedSpy.count(), 0);
@@ -78,7 +78,7 @@ void TestTabbedPanel::testPanelToggling()
     QCOMPARE(toggleSpy.count(), 1);
 
     // Now try to open the panel again. As the panel is already open, no signals should not be sent.
-    testTabbedPanel->showPanel(testPanel);
+    testTabbedPanel->openPanel(testPanel);
     QTest::qWait(1);
     QCOMPARE(closedSpy.count(), 0);
     QCOMPARE(openedSpy.count(), 1);
@@ -93,7 +93,7 @@ void TestTabbedPanel::testPanelToggling()
     QTest::qWait(1);
     QCOMPARE(closedSpy.count(), 0);
     QCOMPARE(openedSpy.count(), 1);
-    QCOMPARE(toggleSpy.count(), 2);
+    QCOMPARE(toggleSpy.count(), 1);
     QTest::qWait(1000);
     QCOMPARE(closedSpy.count(), 1);
     QCOMPARE(openedSpy.count(), 1);