VirtualBox

Changeset 63720 in vbox


Ignore:
Timestamp:
Sep 5, 2016 3:45:33 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
110495
Message:

FE/Qt: bugref:6899: Accessibility support (step 6): Selector UI: Couple of condition fixes for r110457 and r110460.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp

    r63699 r63720  
    9494        /* Make sure item still alive: */
    9595        AssertPtrReturn(item(), 0);
    96 
    9796        /* Make sure index is valid: */
    98         if (iIndex < childCount())
    99             return QAccessible::queryAccessibleInterface(item()->items().at(iIndex));
    100 
    101         /* Null by default: */
    102         return 0;
     97        AssertReturn(iIndex >= 0 && iIndex < childCount(), 0);
     98
     99        /* Return the child with the passed iIndex: */
     100        return QAccessible::queryAccessibleInterface(item()->items().at(iIndex));
    103101    }
    104102
     
    150148        AssertPtrReturn(item(), QAccessible::NoRole);
    151149
    152         /* Return the number of group children: */
     150        /* Return the role of group: */
    153151        if (item()->type() == UIGChooserItemType_Group)
    154152            return QAccessible::List;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserView.cpp

    r63697 r63720  
    7272        /* Make sure view still alive: */
    7373        AssertPtrReturn(view(), 0);
     74        /* Make sure index is valid: */
     75        AssertReturn(iIndex >= 0 && iIndex < childCount(), 0);
    7476
    75         /* Make sure index is valid: */
    76         if (iIndex < childCount())
    77             return QAccessible::queryAccessibleInterface(view()->chooser()->model()->root()->items().at(iIndex));
    78 
    79         /* Null by default: */
    80         return 0;
     77        /* Return the child with the passed iIndex: */
     78        return QAccessible::queryAccessibleInterface(view()->chooser()->model()->root()->items().at(iIndex));
    8179    }
    8280
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette