mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 17:30:15 +00:00
Make the QWeakPointer<DolphinContextMenu> a QScopedPointer<DolphinContextMenu>
This commit is contained in:
parent
ee879cf353
commit
7745a93547
|
@ -758,7 +758,7 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos,
|
||||||
const QUrl& url,
|
const QUrl& url,
|
||||||
const QList<QAction*>& customActions)
|
const QList<QAction*>& customActions)
|
||||||
{
|
{
|
||||||
QWeakPointer<DolphinContextMenu> contextMenu = new DolphinContextMenu(this, pos, item, url);
|
QScopedPointer<DolphinContextMenu> contextMenu(new DolphinContextMenu(this, pos, item, url));
|
||||||
contextMenu.data()->setCustomActions(customActions);
|
contextMenu.data()->setCustomActions(customActions);
|
||||||
const DolphinContextMenu::Command command = contextMenu.data()->open();
|
const DolphinContextMenu::Command command = contextMenu.data()->open();
|
||||||
|
|
||||||
|
@ -781,8 +781,6 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete contextMenu.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::updateControlMenu()
|
void DolphinMainWindow::updateControlMenu()
|
||||||
|
|
Loading…
Reference in a new issue