Handle separators in menus in AT-SPI (Linux accessibility)
authorJosé Millán Soto <fid@gpul.org>
Wed, 12 Sep 2012 17:09:55 +0000 (19:09 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 18 Oct 2012 22:44:54 +0000 (00:44 +0200)
Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/platformsupport/linuxaccessibility/atspiadaptor.cpp

index 54ecf53..f69e236 100644 (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));