From: Nathaniel Graham Date: Wed, 21 Mar 2018 23:00:17 +0000 (-0600) Subject: Fix missing entries in context menu for links X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f728d728649681bef78d53ea3b96d8dc2461a19a Fix missing entries in context menu for links Summary: https://cgit.kde.org/dolphin.git/commit/?id=86f4fcb8cd574f6d886627fc5e01c9edfc84e977 introduced a regression: the context menu for links no longer shows various items that were gated behind being a directory. However, a link can be both a link and a directory, from KIO's perspective. This patch resolves the issue. Test Plan: - Context menus for files, folders, and file links are unchanged. - The missing context menu items for folder links have returned: {F5761809} I should have tested that patch better, and for that I apologize and offer to fix this regression here. I will endeavor to up my reviewing game. Reviewers: rominf, michaelh, #dolphin, rkflx Reviewed By: rominf, rkflx Subscribers: rkflx Differential Revision: https://phabricator.kde.org/D11562 --- diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index fbd62ad25..4801aa3af 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -196,7 +196,8 @@ void DolphinContextMenu::openItemContextMenu() if (m_fileInfo.isLink()) { addAction(m_mainWindow->actionCollection()->action(QStringLiteral("show_target"))); addSeparator(); - } else if (m_fileInfo.isDir()) { + } + if (m_fileInfo.isDir()) { // setup 'Create New' menu DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), m_mainWindow); const DolphinView* view = m_mainWindow->activeViewContainer()->view();