summaryrefslogtreecommitdiff
path: root/kde-frameworks/kservice/files/kservice-5.112.0-desktop-file-no-warning-about-exec.patch
blob: 1e43cc29dab263ce39fbd3892eef5c41d4fcc9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From ba4a641ee3bf4f0ccaa58b03dbdf88abf407b386 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Wed, 15 Nov 2023 14:37:43 +0100
Subject: [PATCH] Remove warning about empty Exec field from KService::exec()

kactivitymanagerd calls exec() just to try and match the desktop file
for an executable, it's not actually about to execute the application.
So don't warn for e.g. qemu.desktop which only exists in order to
provide an icon for the qemu-$ARCH binary (on wayland).

BUG: 430157
FIXED-IN: 5.113
---
 src/services/kservice.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/services/kservice.cpp b/src/services/kservice.cpp
index 3fe75f01..10853e0c 100644
--- a/src/services/kservice.cpp
+++ b/src/services/kservice.cpp
@@ -935,9 +935,6 @@ bool KService::isApplication() const
 QString KService::exec() const
 {
     Q_D(const KService);
-    if (d->m_strType == QLatin1String("Application") && d->m_strExec.isEmpty()) {
-        qCWarning(SERVICES) << "The desktop entry file" << entryPath() << "has Type=" << d->m_strType << "but has no Exec field.";
-    }
     return d->m_strExec;
 }
 
-- 
GitLab