From: Alexander Lohnau Date: Thu, 11 Nov 2021 18:31:33 +0000 (+0100) Subject: Port away from deprecated KFileItemActions::addOpenWithActionsTo method X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/906622ee2aa2f1dc4ddce410fe6eada983b09b39?ds=sidebyside Port away from deprecated KFileItemActions::addOpenWithActionsTo method Instead of the KServiceTypeTrader constraint, pass the desktop file name as part of the exclude list to the method call. --- diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 41f03aa1a..65545c52c 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -477,7 +477,7 @@ KFileItem DolphinContextMenu::baseFileItem() void DolphinContextMenu::addOpenWithActions() { // insert 'Open With...' action or sub menu - m_fileItemActions->addOpenWithActionsTo(this, QStringLiteral("DesktopEntryName != '%1'").arg(qApp->desktopFileName())); + m_fileItemActions->insertOpenWithActionsTo(nullptr, this, QStringList{qApp->desktopFileName()}); } void DolphinContextMenu::addCustomActions()