File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ void subMenu::appendChild(abstractMenuEntry *child)
2828 }
2929}
3030
31+ void subMenu::deleteChilds ()
32+ {
33+ while (m_children) {
34+ abstractMenuEntry *e = m_children;
35+ m_children = m_children->getNext ();
36+ delete (e);
37+ }
38+ }
39+
3140abstractMenuEntry* subMenu::at (int index)
3241{
3342 abstractMenuEntry *c = NULL ;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ struct subMenu: public abstractMenuEntry
3838 virtual bool isSubmenu () const { return true ; }
3939 abstractMenuEntry *getChild () { return m_children; }
4040 void appendChild (abstractMenuEntry *child);
41+ void deleteChilds ();
4142 void setParent (abstractMenuEntry *parent) { m_parent=parent; }
4243 abstractMenuEntry *getParent () const { return m_parent; }
4344 abstractMenuEntry *at (int index);
You can’t perform that action at this time.
0 commit comments