Changeset 75099 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 26, 2018 2:34:21 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r75096 r75099 317 317 } 318 318 319 UIToolsItem *UIToolsModel::item(UIToolType enmType) const 320 { 321 foreach (UIToolsItem *pItem, items()) 322 if (pItem->itemType() == enmType) 323 return pItem; 324 return 0; 325 } 326 319 327 void UIToolsModel::updateLayout() 320 328 { … … 509 517 if (pItem->itemType() == enmTypeGlobal) 510 518 m_pLastItemGlobal = pItem; 511 AssertPtr(m_pLastItemGlobal.data()); 519 if (m_pLastItemGlobal.isNull()) 520 m_pLastItemGlobal = item(UIToolType_Welcome); 512 521 513 522 /* Second of them is current machine class item definition: */ … … 518 527 if (pItem->itemType() == enmTypeMachine) 519 528 m_pLastItemMachine = pItem; 520 AssertPtr(m_pLastItemMachine.data()); 529 if (m_pLastItemMachine.isNull()) 530 m_pLastItemMachine = item(UIToolType_Details); 521 531 } 522 532 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h
r75081 r75099 123 123 /** @name Children stuff. 124 124 * @{ */ 125 /** Holds the item list. */125 /** Returns the item list. */ 126 126 QList<UIToolsItem*> items() const; 127 128 /** Returns the item of passed @a enmType. */ 129 UIToolsItem *item(UIToolType enmType) const; 127 130 /** @} */ 128 131
Note:
See TracChangeset
for help on using the changeset viewer.