@@ -59,22 +59,28 @@ void TestQgsDockWidget::testSignals()
5959 QApplication::setActiveWindow ( w ); // required for focus events
6060 QgsDockWidget* d = new QgsDockWidget ( w );
6161
62- QSignalSpy spyClosed ( d, SIGNAL ( closed ( bool ) ) );
63- QSignalSpy spyOpened ( d, SIGNAL ( opened ( bool ) ) );
62+ QSignalSpy spyClosedStateChanged ( d, SIGNAL ( closedStateChanged ( bool ) ) );
63+ QSignalSpy spyClosed ( d, SIGNAL ( closed () ) );
64+ QSignalSpy spyOpenedStateChanged ( d, SIGNAL ( openedStateChanged ( bool ) ) );
65+ QSignalSpy spyOpened ( d, SIGNAL ( opened () ) );
6466
6567 w->show ();
6668
6769 d->show ();
68- QCOMPARE ( spyClosed.count (), 1 );
69- QCOMPARE ( spyClosed.last ().at ( 0 ).toBool (), false );
70+ QCOMPARE ( spyClosedStateChanged.count (), 1 );
71+ QCOMPARE ( spyClosedStateChanged.last ().at ( 0 ).toBool (), false );
72+ QCOMPARE ( spyOpenedStateChanged.count (), 1 );
73+ QCOMPARE ( spyOpenedStateChanged.last ().at ( 0 ).toBool (), true );
74+ QCOMPARE ( spyClosed.count (), 0 );
7075 QCOMPARE ( spyOpened.count (), 1 );
71- QCOMPARE ( spyOpened.last ().at ( 0 ).toBool (), true );
7276
7377 d->close ();
74- QCOMPARE ( spyClosed.count (), 2 );
75- QCOMPARE ( spyClosed.last ().at ( 0 ).toBool (), true );
76- QCOMPARE ( spyOpened.count (), 2 );
77- QCOMPARE ( spyOpened.last ().at ( 0 ).toBool (), false );
78+ QCOMPARE ( spyClosedStateChanged.count (), 2 );
79+ QCOMPARE ( spyClosedStateChanged.last ().at ( 0 ).toBool (), true );
80+ QCOMPARE ( spyOpenedStateChanged.count (), 2 );
81+ QCOMPARE ( spyOpenedStateChanged.last ().at ( 0 ).toBool (), false );
82+ QCOMPARE ( spyClosed.count (), 1 );
83+ QCOMPARE ( spyOpened.count (), 1 );
7884
7985 delete w;
8086}
0 commit comments