From 32d967fc3f09f3d67c07020e7520fb5803b83f85 Mon Sep 17 00:00:00 2001 From: Piotr Henryk Dabrowski <phd@phd.re> Date: Wed, 17 May 2023 09:26:49 +0200 Subject: [PATCH] Fix running wrong application in 'Open with...' menu BUG: 469824 --- app/fileopscontextmanageritem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/fileopscontextmanageritem.cpp b/app/fileopscontextmanageritem.cpp index b703e36d..da52c5a0 100644 --- a/app/fileopscontextmanageritem.cpp +++ b/app/fileopscontextmanageritem.cpp @@ -380,8 +380,9 @@ void FileOpsContextManagerItem::populateOpenMenu() updateServiceList(); - int idx = 0; + int idx = -1; for (const KService::Ptr &service : qAsConst(mServiceList)) { + ++idx; if (service->name() == QLatin1String("Gwenview")) { continue; } @@ -389,7 +390,6 @@ void FileOpsContextManagerItem::populateOpenMenu() QAction *action = openMenu->addAction(text); action->setIcon(QIcon::fromTheme(service->icon())); action->setData(idx); - ++idx; } openMenu->addSeparator();