From edd98d7659d028f17185835fc14208d655273c82 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 25 Oct 2010 13:45:34 +0000 Subject: - Add support for file item actions (see http://reviewboard.kde.org/r/5659/) - Internal cleanups of DolphinContextMenu code svn path=/trunk/KDE/kdebase/apps/; revision=1189651 --- src/dolphinmainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 0913503d2..f24dd1343 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1193,9 +1193,9 @@ void DolphinMainWindow::openContextMenu(const KFileItem& item, const KUrl& url, const QList& customActions) { - DolphinContextMenu contextMenu(this, item, url); - contextMenu.setCustomActions(customActions); - const DolphinContextMenu::Command command = contextMenu.open(); + QPointer contextMenu = new DolphinContextMenu(this, item, url); + contextMenu->setCustomActions(customActions); + const DolphinContextMenu::Command command = contextMenu->open(); switch (command) { case DolphinContextMenu::OpenParentFolderInNewWindow: { @@ -1213,6 +1213,8 @@ void DolphinMainWindow::openContextMenu(const KFileItem& item, default: break; } + + delete contextMenu; } void DolphinMainWindow::init() -- cgit v1.3