]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
DolphinTabWidget: prefer QUrl::toDisplayString() for tooltips
[dolphin.git] / src / dolphincontextmenu.cpp
index d4807d3a7669635179ab0591c0c47e5a189fde37..d318acab202f80f247fdf83415dbc34a723e678e 100644 (file)
@@ -36,7 +36,6 @@
 #include <QApplication>
 #include <QClipboard>
 #include <QKeyEvent>
-#include <QMenu>
 #include <QMenuBar>
 #include <QMimeDatabase>
 
@@ -335,11 +334,9 @@ void DolphinContextMenu::openViewportContextMenu()
     newFileMenu->setPopupFiles(QList<QUrl>() << m_baseUrl);
     addMenu(newFileMenu->menu());
 
-    // Don't show "Open With" menu items if the current dir is empty, because there's
-    // generally no app that can do anything interesting with an empty directory
-    if (view->itemsCount() != 0) {
-        addOpenWithActions(fileItemActions);
-    }
+    // Show "open with" menu items even if the dir is empty, because there are legitimate
+    // use cases for this, such as opening an empty dir in Kate or VSCode or something
+    addOpenWithActions(fileItemActions);
 
     QAction* pasteAction = createPasteAction();
     addAction(pasteAction);