summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorIngo Klöcker <dev@ingo-kloecker.de>2024-04-22 19:56:07 +0200
committerIngo Klöcker <dev@ingo-kloecker.de>2024-04-26 20:57:34 +0200
commit1685a47f21a4a439d0c0c123235e7142ad0bc3a7 (patch)
tree29b9b26ca3d7a56ba7135ad09a712d331f82240f /tests/auto
parent2606c0966669fe76300d4c818f8c05e778aacd23 (diff)
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>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 0c019544bd..5fd695e2e6 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -2936,7 +2936,8 @@ void tst_QAccessibility::listTest()
QVERIFY(!(cell4->state().expandable));
QVERIFY( (cell4->state().selectable));
QVERIFY(!(cell4->state().selected));
- table2->selectRow(3);
+ QAccessibleSelectionInterface *selection2 = iface->selectionInterface();
+ selection2->select(cell4);
QCOMPARE(listView->selectedItems().size(), 1);
QCOMPARE(listView->selectedItems().at(0)->text(), QLatin1String("Munich"));
QVERIFY(cell4->state().selected);