VirtualBox

Changeset 64487 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 31, 2016 1:44:41 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 111): Settings: Storage page: Adjust AbstractItem and it's sub-class member names to suit QITreeViewItem prototype.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r64486 r64487  
    508508}
    509509
    510 AbstractItem* RootItem::childByPos (int aIndex)
     510AbstractItem* RootItem::childItem (int aIndex) const
    511511{
    512512    return mControllers [aIndex];
    513513}
    514514
    515 AbstractItem* RootItem::childById (const QUuid &aId)
     515AbstractItem* RootItem::childItemById (const QUuid &aId) const
    516516{
    517517    for (int i = 0; i < childCount(); ++ i)
     
    699699}
    700700
    701 AbstractItem* ControllerItem::childByPos (int aIndex)
     701AbstractItem* ControllerItem::childItem (int aIndex) const
    702702{
    703703    return mAttachments [aIndex];
    704704}
    705705
    706 AbstractItem* ControllerItem::childById (const QUuid &aId)
     706AbstractItem* ControllerItem::childItemById (const QUuid &aId) const
    707707{
    708708    for (int i = 0; i < childCount(); ++ i)
     
    955955}
    956956
    957 AbstractItem* AttachmentItem::childByPos (int /* aIndex */)
     957AbstractItem* AttachmentItem::childItem (int /* aIndex */) const
    958958{
    959959    return 0;
    960960}
    961961
    962 AbstractItem* AttachmentItem::childById (const QUuid& /* aId */)
     962AbstractItem* AttachmentItem::childItemById (const QUuid& /* aId */) const
    963963{
    964964    return 0;
     
    10521052
    10531053    AbstractItem *item = !aParent.isValid() ? mRootItem :
    1054                          static_cast <AbstractItem*> (aParent.internalPointer())->childByPos (aRow);
     1054                         static_cast <AbstractItem*> (aParent.internalPointer())->childItem (aRow);
    10551055
    10561056    return item ? createIndex (aRow, aColumn, item) : QModelIndex();
     
    16731673void StorageModel::delController (const QUuid &aCtrId)
    16741674{
    1675     if (AbstractItem *item = mRootItem->childById (aCtrId))
     1675    if (AbstractItem *item = mRootItem->childItemById (aCtrId))
    16761676    {
    16771677        int itemPosition = mRootItem->posOfChild (item);
     
    16841684QModelIndex StorageModel::addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType, const QString &strMediumId)
    16851685{
    1686     if (AbstractItem *parent = mRootItem->childById (aCtrId))
     1686    if (AbstractItem *parent = mRootItem->childItemById (aCtrId))
    16871687    {
    16881688        int parentPosition = mRootItem->posOfChild (parent);
     
    17001700void StorageModel::delAttachment (const QUuid &aCtrId, const QUuid &aAttId)
    17011701{
    1702     if (AbstractItem *parent = mRootItem->childById (aCtrId))
     1702    if (AbstractItem *parent = mRootItem->childItemById (aCtrId))
    17031703    {
    17041704        int parentPosition = mRootItem->posOfChild (parent);
    1705         if (AbstractItem *item = parent->childById (aAttId))
     1705        if (AbstractItem *item = parent->childItemById (aAttId))
    17061706        {
    17071707            int itemPosition = parent->posOfChild (item);
     
    17261726    {
    17271727        /* Get iterated controller item: */
    1728         AbstractItem *pItemLevel1 = mRootItem->childByPos(iItemLevel1Pos);
     1728        AbstractItem *pItemLevel1 = mRootItem->childItem(iItemLevel1Pos);
    17291729        ControllerItem *pControllerItem = static_cast<ControllerItem*>(pItemLevel1);
    17301730        /* Count of attachment items: */
     
    17361736        {
    17371737            /* Get iterated attachment item: */
    1738             AbstractItem *pItemLevel2 = pItemLevel1->childByPos(iItemLevel2Pos);
     1738            AbstractItem *pItemLevel2 = pItemLevel1->childItem(iItemLevel2Pos);
    17391739            AttachmentItem *pAttachmentItem = static_cast<AttachmentItem*>(pItemLevel2);
    17401740            /* Get iterated attachment storage slot: */
     
    18131813    {
    18141814        beginRemoveRows(root(), 0, 0);
    1815         delete mRootItem->childByPos(0);
     1815        delete mRootItem->childItem(0);
    18161816        endRemoveRows();
    18171817    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r64486 r64487  
    268268
    269269    virtual ItemType rtti() const = 0;
    270     virtual AbstractItem* childByPos (int aIndex) = 0;
    271     virtual AbstractItem* childById (const QUuid &aId) = 0;
     270    virtual AbstractItem* childItem (int aIndex) const = 0;
     271    virtual AbstractItem* childItemById (const QUuid &aId) const = 0;
    272272    virtual int posOfChild (AbstractItem *aItem) const = 0;
    273273    virtual int childCount() const = 0;
     
    300300
    301301    ItemType rtti() const;
    302     AbstractItem* childByPos (int aIndex);
    303     AbstractItem* childById (const QUuid &aId);
     302    AbstractItem* childItem (int aIndex) const;
     303    AbstractItem* childItemById (const QUuid &aId) const;
    304304    int posOfChild (AbstractItem *aItem) const;
    305305    int childCount() const;
     
    344344
    345345    ItemType rtti() const;
    346     AbstractItem* childByPos (int aIndex);
    347     AbstractItem* childById (const QUuid &aId);
     346    AbstractItem* childItem (int aIndex) const;
     347    AbstractItem* childItemById (const QUuid &aId) const;
    348348    int posOfChild (AbstractItem *aItem) const;
    349349    int childCount() const;
     
    400400
    401401    ItemType rtti() const;
    402     AbstractItem* childByPos (int aIndex);
    403     AbstractItem* childById (const QUuid &aId);
     402    AbstractItem* childItem (int aIndex) const;
     403    AbstractItem* childItemById (const QUuid &aId) const;
    404404    int posOfChild (AbstractItem *aItem) const;
    405405    int childCount() const;
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