Changeset 76773 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 11, 2019 12:59:21 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r76606 r76773 2278 2278 { 2279 2279 return qobject_cast<UIActionPoolManager*>(this); 2280 } 2281 2282 QActionGroup *UIActionPool::actionGroup(int iIndex) const 2283 { 2284 AssertReturn(m_groupPool.contains(iIndex), 0); 2285 return m_groupPool.value(iIndex); 2280 2286 } 2281 2287 … … 2517 2523 void UIActionPool::cleanupPool() 2518 2524 { 2519 /* Cleanup pool: */2525 qDeleteAll(m_groupPool); 2520 2526 qDeleteAll(m_pool); 2521 2527 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r76581 r76773 526 526 QList<UIAction*> actions() const { return m_pool.values(); } 527 527 528 /** Returns the action group for the passed @a iIndex. 529 * @note Only menu actions can have action groups. */ 530 QActionGroup *actionGroup(int iIndex) const; 531 528 532 /** Returns the list of main menus. */ 529 533 QList<QMenu*> menus() const { return m_mainMenus; } … … 641 645 /** Holds the map of actions. */ 642 646 QMap<int, UIAction*> m_pool; 647 /** Holds the map of action groups. 648 * @note Only menu actions can have action groups. */ 649 QMap<int, QActionGroup*> m_groupPool; 643 650 /** Holds the map of validation handlers. */ 644 651 QMap<int, PointerToFunction> m_menuUpdateHandlers;
Note:
See TracChangeset
for help on using the changeset viewer.