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.
This commit is contained in:
Alexander Lohnau 2021-11-11 19:31:33 +01:00
parent a8ac157bdc
commit 906622ee2a

View file

@ -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()