@@ -96,8 +96,9 @@ void DebuggerDesktop::_drawMainMenuBar()
9696 // Windows
9797 if (auto pEm = qIm::LockMenu (" Window" ))
9898 {
99- for (qd::UiNode* pCurWnd : m_pWindows )
99+ for (int i = 0 ; i < getNumChild (); ++i )
100100 {
101+ qd::UiNode* pCurWnd = getChild (i);
101102 if (!pCurWnd)
102103 continue ;
103104 bool bVis = pCurWnd->isVisible ();
@@ -115,13 +116,12 @@ void DebuggerDesktop::onNodeCreated(qd::UiNodeCreator* mk)
115116{
116117 TSuper::onNodeCreated (mk);
117118
118- m_pWindows.resize ((size_t )WndId::MostCommonCount);
119119 m_pOperationMgr = &qd::OperationsRegistry::get (); // createComp_<qd::UiOperationMgrComp>()->m_pOpMgr;
120120 m_pShortcutMgr = qd::ShortcutsMgr::get (); // createComp_<qd::UiShortcutsMgrComp>();
121121 m_pShortcutMgr->createPredefinedShortcuts (
122122 eastl::span (&amD::shortcut::g_shortcuts_list[0 ], (size_t )amD::shortcut::EId::MAX_COUNT));
123123
124- // create all m_pWindows
124+ // create all m_pChilds
125125 createAllUiWndows ();
126126
127127 amD::operation::AmDebuggerOperationCreator operationCreate;
@@ -147,14 +147,18 @@ void DebuggerDesktop::createAllUiWndows()
147147 UiViewCreateCtx cv (this );
148148 amD::AmDbgWindow* pCurWnd = pCreateAttr->makeInstance_ <amD::AmDbgWindow>(cv);
149149 assert (pCurWnd);
150- addWindowNode (pCurWnd);
150+ addChild (pCurWnd);
151151 }
152152}
153153
154+ void DebuggerDesktop::destroy ()
155+ {
156+ TSuper::destroy ();
157+ }
158+
154159
155160DebuggerDesktop::~DebuggerDesktop ()
156161{
157- assert (m_pWindows.empty ());
158162}
159163
160164
@@ -266,10 +270,5 @@ void DebuggerDesktop::_drawToolBar()
266270
267271
268272
269- void DebuggerDesktop::destroy ()
270- {
271- TSuper::destroy ();
272- }
273-
274273
275274}; // namespace amD
0 commit comments