File: upstream_26233825_kcms-runners-Add-power-session-actions-to-favorite-runners-list.patch

package info (click to toggle)
plasma-desktop 4%3A6.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 61,044 kB
  • sloc: cpp: 37,691; ansic: 2,617; python: 1,386; javascript: 1,163; xml: 1,082; sh: 128; makefile: 16
file content (48 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 262338251fddb021e0658c9e39f6f310b8a4e3f9 Mon Sep 17 00:00:00 2001
From: Nate Graham <nate@kde.org>
Date: Thu, 6 Mar 2025 17:46:30 -0700
Subject: [PATCH] kcms/runners: Add power/session actions to favorite runners
 list

Right now we have a problem that when people search for "shut down" and
"reboot" and the like, the Desktop Sessions KCM appears first. This is
currently expected because the System Settings runner is a default
favorite runner, and the power/session runners are not. Logical, but not
ideal.

There are three ways we can fix this:
1. Add the runners for power and session actions to the default favorite
   runners list.
2. Remove a bunch of keywords from the desktop sessions KCM so it
   doesn't match those kinds of searches anymore.
3. Remove all default favorite runners and hope the internal weightings
   are good enough to solve the problem.

This commit implements option 1, which is the least invasive change
given the current implementations.

BUG: 474981
FIXED-IN: 6.4.0
---
 kcms/runners/plasmasearch/kcm.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kcms/runners/plasmasearch/kcm.h b/kcms/runners/plasmasearch/kcm.h
index d5b6c20049..85b12195f4 100644
--- a/kcms/runners/plasmasearch/kcm.h
+++ b/kcms/runners/plasmasearch/kcm.h
@@ -32,7 +32,10 @@ public:
     }
     static QStringList defaultFavoriteIds()
     {
-        return {QStringLiteral("krunner_services"), QStringLiteral("krunner_systemsettings")};
+        return {QStringLiteral("krunner_sessions"),
+                QStringLiteral("krunner_powerdevil"),
+                QStringLiteral("krunner_services"),
+                QStringLiteral("krunner_systemsettings")};
     }
 
 public Q_SLOTS:
-- 
GitLab