From 1685a47f21a4a439d0c0c123235e7142ad0bc3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Mon, 22 Apr 2024 19:56:07 +0200 Subject: [PATCH] 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 --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 0c019544bd7..5fd695e2e66 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);