Commit c58e5433 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[libtaskmanager] Prevent launching a new instance of services with NoDisplay=true

It is not possible for the user to launch such an app from the UI, so we should not allow to launch a new instance from the task manager context menu.

BUG: 447204
parent 7e8b3491
Pipeline #113997 passed with stage
in 4 minutes and 35 seconds
......@@ -770,6 +770,21 @@ bool canLauchNewInstance(const AppData &appData)
return false;
QString desktopEntry =;
// Remove suffix if necessary
if (desktopEntry.endsWith(QLatin1String(".desktop"))) {
const KService::Ptr service = KService::serviceByDesktopName(desktopEntry);
if (service) {
if (service->noDisplay()) {
return false;
return true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment