diff options
| author | Peter Penz <[email protected]> | 2010-10-25 13:45:34 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-10-25 13:45:34 +0000 |
| commit | edd98d7659d028f17185835fc14208d655273c82 (patch) | |
| tree | af22025a134e7b496cf0d8b079389672371e5fdc /src/dolphinmainwindow.cpp | |
| parent | 4ca9aeaad2c0f2e00bca52618ad9e6d1cff14b65 (diff) | |
- 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
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<QAction*>& customActions) { - DolphinContextMenu contextMenu(this, item, url); - contextMenu.setCustomActions(customActions); - const DolphinContextMenu::Command command = contextMenu.open(); + QPointer<DolphinContextMenu> 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() |
