Fix tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet
Don't assume signals will not be emitted during show. The test should focus on testing that changing the model results in change signals. What happens before that is not under test, and not stable. Change-Id: I71e62abc15fc81c069d7685e4342e795449c3632 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
b91a6ef9cd
commit
ab5c28ac55
@ -1710,12 +1710,11 @@ void tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet()
|
||||
|
||||
list.setSelectionModel(new QItemSelectionModel(list.model()));
|
||||
list.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&list));
|
||||
|
||||
QSignalSpy currentItemChangedSpy(&list, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)));
|
||||
QSignalSpy itemSelectionChangedSpy(&list, SIGNAL(itemSelectionChanged()));
|
||||
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&list));
|
||||
|
||||
QCOMPARE(currentItemChangedSpy.count(), 0);
|
||||
QCOMPARE(itemSelectionChangedSpy.count(), 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user