From 3df9ac2f0719718ceb7385e46445447d95fd7857 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 23 Sep 2011 14:23:52 +0200 Subject: Fix accessible menu not returning child name. When accessible name is set, QAccessibleMenu would always return the menu's name, not that of the child action. Task-Number: QTBUG-21578 Reviewed-by: Jan-Arve --- tests/auto/qaccessibility/tst_qaccessibility.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index d452820f9c..d24f52f37d 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -2531,6 +2531,12 @@ void tst_QAccessibility::menuTest() QCOMPARE(interface->actionText(QAccessible::DefaultAction, QAccessible::Name, 4), QString()); QCOMPARE(interface->actionText(QAccessible::DefaultAction, QAccessible::Name, 5), QString("Execute")); + // QTBUG-21578 - after setting accessible name on a menu it would no longer + // return the right names for it's children. + QCOMPARE(interface->text(QAccessible::Name, 1), QString("New...")); + file->setAccessibleName("File"); + QCOMPARE(interface->text(QAccessible::Name, 1), QString("New...")); + QAccessibleInterface *iface = 0; QAccessibleInterface *iface2 = 0; -- cgit v1.2.3