Skip to content

Commit

Permalink
Merge pull request #1327 from miyanyan/memory
Browse files Browse the repository at this point in the history
[fix] memory leak in ZenoNewnodeMenu
  • Loading branch information
legobadman authored Aug 2, 2023
2 parents 6080f7a + 5efb06b commit d1ce07c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ui/zenoedit/nodesys/zenonewmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ ZenoNewnodeMenu::ZenoNewnodeMenu(const QModelIndex& subgIdx, const NODE_CATES& c
, m_searchEdit(nullptr)
, m_pWAction(nullptr)
{
QVBoxLayout* pLayout = new QVBoxLayout;

m_pWAction = new QWidgetAction(this);
m_searchEdit = new ZenoGvLineEdit;
m_searchEdit = new ZenoGvLineEdit(this);
m_searchEdit->setAutoFillBackground(false);
m_searchEdit->setTextMargins(QMargins(8, 0, 0, 0));
m_searchEdit->installEventFilter(this);
Expand Down Expand Up @@ -148,8 +146,8 @@ QList<QAction*> ZenoNewnodeMenu::getCategoryActions(IGraphsModel* pModel, QModel
{
for (const NODE_CATE& cate : cates)
{
QAction* pAction = new QAction(cate.name);
QMenu* pChildMenu = new QMenu;
QAction* pAction = new QAction(cate.name, this);
QMenu* pChildMenu = new QMenu(this);
pChildMenu->setToolTipsVisible(true);
for (const QString& name : cate.nodes)
{
Expand Down

0 comments on commit d1ce07c

Please sign in to comment.