Initialize m_index in MenuItem's constructors.
This commit is contained in:
parent
2238c004aa
commit
7e17056c35
1 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,8 @@ public:
|
|||
m_enabled(true),
|
||||
m_selected(false),
|
||||
m_close_on_click(true),
|
||||
m_toggle_item(false)
|
||||
m_toggle_item(false),
|
||||
m_index(0)
|
||||
{ }
|
||||
|
||||
explicit MenuItem(const BiDiString &label)
|
||||
|
@ -58,6 +59,7 @@ public:
|
|||
m_selected(false),
|
||||
m_close_on_click(true),
|
||||
m_toggle_item(false)
|
||||
m_index(0)
|
||||
{ }
|
||||
|
||||
MenuItem(const BiDiString &label, Menu &host_menu)
|
||||
|
@ -68,6 +70,7 @@ public:
|
|||
m_selected(false),
|
||||
m_close_on_click(true),
|
||||
m_toggle_item(false)
|
||||
m_index(0)
|
||||
{ }
|
||||
/// create a menu item with a specific command to be executed on click
|
||||
MenuItem(const BiDiString &label, RefCount<Command<void> > &cmd, Menu *menu = 0)
|
||||
|
@ -79,6 +82,7 @@ public:
|
|||
m_selected(false),
|
||||
m_close_on_click(true),
|
||||
m_toggle_item(false)
|
||||
m_index(0)
|
||||
{ }
|
||||
|
||||
MenuItem(const BiDiString &label, Menu *submenu, Menu *host_menu = 0)
|
||||
|
@ -89,6 +93,7 @@ public:
|
|||
m_selected(false),
|
||||
m_close_on_click(true),
|
||||
m_toggle_item(false)
|
||||
m_index(0)
|
||||
{ }
|
||||
virtual ~MenuItem();
|
||||
|
||||
|
|
Loading…
Reference in a new issue