diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-01-28 16:25:41 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-01-28 16:25:41 +0100 |
| commit | 7745a9354776c6043b4f691260e434c29de6ca0c (patch) | |
| tree | 496debbcddf9c82f8480ac22976b185b667fd0d1 /src | |
| parent | ee879cf35360c8aa06764d555b020c660bee9926 (diff) | |
Make the QWeakPointer<DolphinContextMenu> a QScopedPointer<DolphinContextMenu>
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index a05127687..398af70a8 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -758,7 +758,7 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, const QUrl& url, 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); const DolphinContextMenu::Command command = contextMenu.data()->open(); @@ -781,8 +781,6 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, default: break; } - - delete contextMenu.data(); } void DolphinMainWindow::updateControlMenu() |
