Commit 1f3ab6f7 authored by Harald Sitter's avatar Harald Sitter 🐬

[service runner] throw out kde3 "compat" code

Desktop files such as kde/foo.desktop are identified as kde-foo.desktop
because of the menu spec

If the directory contains sub-directories then these sub-directories should be (recursively) scanned as well. The name of the subdirectory should be added as prefix to the desktop-file id together with a dash character ("-")

the runner therefore broadly assumed that kde-foo.desktop is always
the desktop file kde/foo.desktop and since kde/ was only used up to KDE3
this assumption formed the basis for sepcial KDE3 compat handling. that is
of course wrong because a service might just as well actually have a
prefix and be actually called kde-foo.desktop rather than
kde/foo.desktop. Specific example: kde-gtk-config.desktop

seeing as this is ancient compatibility code that is actually wrong,
the easiest solution seems to be dropping the code entirely (and thus no
longer assume kde- has some special meaning).

(also I didn't find a way to get the underlying filename of a kservice,
 so making the code not wrong seems non-trivial)

CHANGELOG: the GTK+ settings module now correctly appears in krunner and kickoff
BUG: 383287

Test Plan: gtk kcm correctly shows up in both kickoff and krunner searches

Reviewers: broulik

Reviewed By: broulik

Subscribers: GB_2, plasma-devel

Tags: #plasma

Differential Revision:
parent 9a4bb220
......@@ -280,24 +280,7 @@ private:
if (service->categories().contains(QStringLiteral("KDE")) || service->serviceTypes().contains(QStringLiteral("KCModule"))) {
qCDebug(RUNNER_SERVICES) << "found a kde thing" << id << match.subtext() << relevance;
if (id.startsWith(QLatin1String("kde-"))) {
qCDebug(RUNNER_SERVICES) << "old" << !service->isApplication();
if (!service->isApplication()) {
// avoid showing old kcms and what not
// This is an older version, let's disambiguate it
QString subtext(QStringLiteral("KDE3"));
if (!match.subtext().isEmpty()) {
subtext.append(QStringLiteral(", ") + match.subtext());
} else {
relevance += .09;
relevance += .09;
qCDebug(RUNNER_SERVICES) << service->name() << "is this relevant:" << relevance;
Markdown is supported
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