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());
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);
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);
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);