Skip to content

Commit 0c10f68

Browse files
committed
Followup bbbc9d0: Fix tests
1 parent aa9fe9e commit 0c10f68

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

tests/src/gui/testqgsdockwidget.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)