Select a list item instead of a row for the list test
In a list view each row contains exactly one element. Using selectRow feels like wrong API for a list view. Use the select function of the selection interface instead. Change-Id: Id53091c797b89f0919b5d6441c98349e4989a495 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
2606c09666
commit
1685a47f21
@ -2936,7 +2936,8 @@ void tst_QAccessibility::listTest()
|
|||||||
QVERIFY(!(cell4->state().expandable));
|
QVERIFY(!(cell4->state().expandable));
|
||||||
QVERIFY( (cell4->state().selectable));
|
QVERIFY( (cell4->state().selectable));
|
||||||
QVERIFY(!(cell4->state().selected));
|
QVERIFY(!(cell4->state().selected));
|
||||||
table2->selectRow(3);
|
QAccessibleSelectionInterface *selection2 = iface->selectionInterface();
|
||||||
|
selection2->select(cell4);
|
||||||
QCOMPARE(listView->selectedItems().size(), 1);
|
QCOMPARE(listView->selectedItems().size(), 1);
|
||||||
QCOMPARE(listView->selectedItems().at(0)->text(), QLatin1String("Munich"));
|
QCOMPARE(listView->selectedItems().at(0)->text(), QLatin1String("Munich"));
|
||||||
QVERIFY(cell4->state().selected);
|
QVERIFY(cell4->state().selected);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user