Commit 1cfb6619 authored by Michal Klocek's avatar Michal Klocek Committed by Allan Sandfeld Jensen
Browse files

Fix memory leak of standardContextMenu


Add deleteLater after menu is hidden.

Change-Id: I7bf7f5e83b40328e220a1ff91f07055c160b6ab9
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Showing with 1 addition and 0 deletions
......@@ -292,6 +292,7 @@ bool QWebEngineView::event(QEvent *ev)
void QWebEngineView::contextMenuEvent(QContextMenuEvent *event)
{
QMenu *menu = page()->createStandardContextMenu();
connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
menu->popup(event->globalPos());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment