Handle separators in menus in AT-SPI (Linux accessibility)

Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
bb10
José Millán Soto 2012-09-12 19:09:55 +02:00 committed by The Qt Project
parent a4ffbfefe7
commit 687e31df80
1 changed files with 3 additions and 2 deletions

View File

@ -1518,8 +1518,9 @@ QString AtSpiAdaptor::pathForInterface(const QAIPointer &interface, bool inDestr
QAIPointer interfaceWithObject = interface;
QString path;
if (interface->role() == QAccessible::MenuItem && interface->object() &&
inheritsQAction(interface->object())) {
QAccessible::Role role = interface->role();
if (((role == QAccessible::MenuItem) || (role == QAccessible::Separator)) &&
interface->object() && inheritsQAction(interface->object())) {
interfaceWithObject = QAIPointer(interface->parent());
int childIndex = interfaceWithObject->indexOfChild(interface.data());
path.append(QString::fromLatin1("/%1").arg(childIndex));