Changeset 64487 in vbox for trunk/src/VBox
- Timestamp:
- Oct 31, 2016 1:44:41 PM (8 years ago)
- 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 508 508 } 509 509 510 AbstractItem* RootItem::child ByPos (int aIndex)510 AbstractItem* RootItem::childItem (int aIndex) const 511 511 { 512 512 return mControllers [aIndex]; 513 513 } 514 514 515 AbstractItem* RootItem::child ById (const QUuid &aId)515 AbstractItem* RootItem::childItemById (const QUuid &aId) const 516 516 { 517 517 for (int i = 0; i < childCount(); ++ i) … … 699 699 } 700 700 701 AbstractItem* ControllerItem::child ByPos (int aIndex)701 AbstractItem* ControllerItem::childItem (int aIndex) const 702 702 { 703 703 return mAttachments [aIndex]; 704 704 } 705 705 706 AbstractItem* ControllerItem::child ById (const QUuid &aId)706 AbstractItem* ControllerItem::childItemById (const QUuid &aId) const 707 707 { 708 708 for (int i = 0; i < childCount(); ++ i) … … 955 955 } 956 956 957 AbstractItem* AttachmentItem::child ByPos (int /* aIndex */)957 AbstractItem* AttachmentItem::childItem (int /* aIndex */) const 958 958 { 959 959 return 0; 960 960 } 961 961 962 AbstractItem* AttachmentItem::child ById (const QUuid& /* aId */)962 AbstractItem* AttachmentItem::childItemById (const QUuid& /* aId */) const 963 963 { 964 964 return 0; … … 1052 1052 1053 1053 AbstractItem *item = !aParent.isValid() ? mRootItem : 1054 static_cast <AbstractItem*> (aParent.internalPointer())->child ByPos(aRow);1054 static_cast <AbstractItem*> (aParent.internalPointer())->childItem (aRow); 1055 1055 1056 1056 return item ? createIndex (aRow, aColumn, item) : QModelIndex(); … … 1673 1673 void StorageModel::delController (const QUuid &aCtrId) 1674 1674 { 1675 if (AbstractItem *item = mRootItem->child ById (aCtrId))1675 if (AbstractItem *item = mRootItem->childItemById (aCtrId)) 1676 1676 { 1677 1677 int itemPosition = mRootItem->posOfChild (item); … … 1684 1684 QModelIndex StorageModel::addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType, const QString &strMediumId) 1685 1685 { 1686 if (AbstractItem *parent = mRootItem->child ById (aCtrId))1686 if (AbstractItem *parent = mRootItem->childItemById (aCtrId)) 1687 1687 { 1688 1688 int parentPosition = mRootItem->posOfChild (parent); … … 1700 1700 void StorageModel::delAttachment (const QUuid &aCtrId, const QUuid &aAttId) 1701 1701 { 1702 if (AbstractItem *parent = mRootItem->child ById (aCtrId))1702 if (AbstractItem *parent = mRootItem->childItemById (aCtrId)) 1703 1703 { 1704 1704 int parentPosition = mRootItem->posOfChild (parent); 1705 if (AbstractItem *item = parent->child ById (aAttId))1705 if (AbstractItem *item = parent->childItemById (aAttId)) 1706 1706 { 1707 1707 int itemPosition = parent->posOfChild (item); … … 1726 1726 { 1727 1727 /* Get iterated controller item: */ 1728 AbstractItem *pItemLevel1 = mRootItem->child ByPos(iItemLevel1Pos);1728 AbstractItem *pItemLevel1 = mRootItem->childItem(iItemLevel1Pos); 1729 1729 ControllerItem *pControllerItem = static_cast<ControllerItem*>(pItemLevel1); 1730 1730 /* Count of attachment items: */ … … 1736 1736 { 1737 1737 /* Get iterated attachment item: */ 1738 AbstractItem *pItemLevel2 = pItemLevel1->child ByPos(iItemLevel2Pos);1738 AbstractItem *pItemLevel2 = pItemLevel1->childItem(iItemLevel2Pos); 1739 1739 AttachmentItem *pAttachmentItem = static_cast<AttachmentItem*>(pItemLevel2); 1740 1740 /* Get iterated attachment storage slot: */ … … 1813 1813 { 1814 1814 beginRemoveRows(root(), 0, 0); 1815 delete mRootItem->child ByPos(0);1815 delete mRootItem->childItem(0); 1816 1816 endRemoveRows(); 1817 1817 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r64486 r64487 268 268 269 269 virtual ItemType rtti() const = 0; 270 virtual AbstractItem* child ByPos (int aIndex)= 0;271 virtual AbstractItem* child ById (const QUuid &aId)= 0;270 virtual AbstractItem* childItem (int aIndex) const = 0; 271 virtual AbstractItem* childItemById (const QUuid &aId) const = 0; 272 272 virtual int posOfChild (AbstractItem *aItem) const = 0; 273 273 virtual int childCount() const = 0; … … 300 300 301 301 ItemType rtti() const; 302 AbstractItem* child ByPos (int aIndex);303 AbstractItem* child ById (const QUuid &aId);302 AbstractItem* childItem (int aIndex) const; 303 AbstractItem* childItemById (const QUuid &aId) const; 304 304 int posOfChild (AbstractItem *aItem) const; 305 305 int childCount() const; … … 344 344 345 345 ItemType rtti() const; 346 AbstractItem* child ByPos (int aIndex);347 AbstractItem* child ById (const QUuid &aId);346 AbstractItem* childItem (int aIndex) const; 347 AbstractItem* childItemById (const QUuid &aId) const; 348 348 int posOfChild (AbstractItem *aItem) const; 349 349 int childCount() const; … … 400 400 401 401 ItemType rtti() const; 402 AbstractItem* child ByPos (int aIndex);403 AbstractItem* child ById (const QUuid &aId);402 AbstractItem* childItem (int aIndex) const; 403 AbstractItem* childItemById (const QUuid &aId) const; 404 404 int posOfChild (AbstractItem *aItem) const; 405 405 int childCount() const;
Note:
See TracChangeset
for help on using the changeset viewer.