Fix memory leak.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-21 17:47:07 +02:00
parent 7551cfda87
commit f3b900902b

View File

@ -103,7 +103,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
item = ui->tableWidget->item(row, 0); item = ui->tableWidget->item(row, 0);
const quint32 id = item->data(Qt::UserRole).toUInt(); const quint32 id = item->data(Qt::UserRole).toUInt();
QMenu *menu = new QMenu; QMenu *menu = new QMenu(this);
QAction *actionRename = menu->addAction(tr("Rename")); QAction *actionRename = menu->addAction(tr("Rename"));
QAction *actionDelete = menu->addAction(tr("Delete")); QAction *actionDelete = menu->addAction(tr("Delete"));
QAction *selectedAction = menu->exec(ui->tableWidget->viewport()->mapToGlobal(pos)); QAction *selectedAction = menu->exec(ui->tableWidget->viewport()->mapToGlobal(pos));