Changeset 26705 in vbox
- Timestamp:
- Feb 23, 2010 2:07:15 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57943
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp
r26691 r26705 786 786 UIActionsPool::UIActionsPool(QObject *pParent) 787 787 : QObject(pParent) 788 { 789 /* Resize & clean actions vector */ 790 m_actionsPool.resize(UIActionIndex_Max); 791 for (int i = 0; i < m_actionsPool.size(); ++ i) 792 m_actionsPool[i] = 0; 793 788 , m_actionsPool(UIActionIndex_End, 0) 789 { 794 790 /* Common actions: */ 795 791 m_actionsPool[UIActionIndex_Separator] = new SeparatorAction(this); … … 835 831 836 832 /* Test all actions were initialized */ 837 for (int i = 0; i < m_actionsPool.size(); ++ i) 838 { 839 if (!m_actionsPool[i]) 840 { 833 for (int i = 0; i < m_actionsPool.size(); ++i) 834 if (!m_actionsPool.at(i)) 841 835 AssertMsgFailed(("Action #%d is not created!\n", i)); 842 }843 }844 836 } 845 837 846 838 UIActionsPool::~UIActionsPool() 847 839 { 848 for (int i = 0; i < m_actionsPool.size(); ++ 849 delete m_actionsPool [i];840 for (int i = 0; i < m_actionsPool.size(); ++i) 841 delete m_actionsPool.at(i); 850 842 m_actionsPool.clear(); 851 843 } … … 853 845 UIAction* UIActionsPool::action(UIActionIndex index) const 854 846 { 855 return m_actionsPool [index];847 return m_actionsPool.at(index); 856 848 } 857 849 858 850 #include "UIActionsPool.moc" 851 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h
r26691 r26705 97 97 #endif 98 98 99 UIActionIndex_Max 99 UIActionIndex_End, 100 /** The usual 32-bit type hack. */ 101 UIActionIndex_32Bit_Hack = 0x7fffffff 100 102 }; 101 103
Note:
See TracChangeset
for help on using the changeset viewer.