From a87f85dbf9bd1ea90936bd9a4609229edb15c264 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 18 Oct 2018 16:02:19 +0200 Subject: Linux Accessibility: Fix expandable state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The state was forgotten from the translation layer, this is important for tree views. Fixes: QTBUG-71223 Change-Id: Ief4004fe455889f9d5a7eb018bf34d37c36a6bd9 Reviewed-by: Jan Arve Sæther --- tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp index 0472a78729..47d24ce171 100644 --- a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp +++ b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp @@ -374,13 +374,21 @@ void tst_QAccessibilityLinux::testTreeWidget() QDBusInterface *cell3 = getInterface(tableChildren.at(2), "org.a11y.atspi.Accessible"); QCOMPARE(cell3->property("Name").toString(), QLatin1String("0.0")); + QVERIFY(!hasState(cell3, ATSPI_STATE_EXPANDABLE)); + QVERIFY(!hasState(cell3, ATSPI_STATE_EXPANDED)); QDBusInterface *cell4 = getInterface(tableChildren.at(3), "org.a11y.atspi.Accessible"); QCOMPARE(cell4->property("Name").toString(), QLatin1String("0.1")); + QDBusInterface *dbus_top2 = getInterface(tableChildren.at(4), "org.a11y.atspi.Accessible"); + QCOMPARE(dbus_top2->property("Name").toString(), QLatin1String("1.0")); + QVERIFY(hasState(dbus_top2, ATSPI_STATE_EXPANDABLE)); + QVERIFY(!hasState(dbus_top2, ATSPI_STATE_EXPANDED)); + tree->expandItem(top2); tableChildren = getChildren(treeIface); QCOMPARE(tableChildren.size(), 8); + QVERIFY(hasState(dbus_top2, ATSPI_STATE_EXPANDED)); QDBusInterface *cell5 = getInterface(tableChildren.at(6), "org.a11y.atspi.Accessible"); QCOMPARE(cell5->property("Name").toString(), QLatin1String("1.0 0.0")); -- cgit v1.2.3