From 33e32f293bc8c77fe06089e99ade6b0b20705de4 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Fri, 14 Jul 2023 07:03:32 +0200 Subject: [PATCH] Remove X-KWin-Exclude-Listing metadata flag We only have one KWin script making use of this and that one is shown regardless. The issue with this flag is that it will hide scripts from the user without a possibility to see them. For effects, we have quite a few internal ones and a possibility to show even hidden ones. But we can not reuse this logic for the scripts. BUG: 458572 FIXED-IN: 6.0 --- src/kcms/scripts/kwinscriptsdata.cpp | 6 +----- src/kcms/tabbox/main.cpp | 4 ---- src/plugins/desktopchangeosd/package/metadata.json | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/kcms/scripts/kwinscriptsdata.cpp b/src/kcms/scripts/kwinscriptsdata.cpp index cdcde73f0a..4ed8106e62 100644 --- a/src/kcms/scripts/kwinscriptsdata.cpp +++ b/src/kcms/scripts/kwinscriptsdata.cpp @@ -20,12 +20,8 @@ KWinScriptsData::KWinScriptsData(QObject *parent) QVector KWinScriptsData::pluginMetaDataList() const { - auto filter = [](const KPluginMetaData &md) { - return md.isValid() && !md.rawData().value("X-KWin-Exclude-Listing").toBool(); - }; - const QString scriptFolder = QStringLiteral("kwin/scripts/"); - return KPackage::PackageLoader::self()->findPackages(QStringLiteral("KWin/Script"), scriptFolder, filter).toVector(); + return KPackage::PackageLoader::self()->findPackages(QStringLiteral("KWin/Script"), scriptFolder); } bool KWinScriptsData::isDefaults() const diff --git a/src/kcms/tabbox/main.cpp b/src/kcms/tabbox/main.cpp index 1a8f50a963..5d51acff37 100644 --- a/src/kcms/tabbox/main.cpp +++ b/src/kcms/tabbox/main.cpp @@ -170,10 +170,6 @@ void KWinTabBoxConfig::initLayoutLists() if (offer.value("X-Plasma-API") != "declarativeappletscript") { continue; } - // we don't have a proper servicetype - if (offer.value("X-KWin-Exclude-Listing") == QStringLiteral("true")) { - continue; - } const QString scriptName = offer.value("X-Plasma-MainScript"); const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/tabbox/") + pluginName + QLatin1String("/contents/") diff --git a/src/plugins/desktopchangeosd/package/metadata.json b/src/plugins/desktopchangeosd/package/metadata.json index dfad869280..cccab435dc 100644 --- a/src/plugins/desktopchangeosd/package/metadata.json +++ b/src/plugins/desktopchangeosd/package/metadata.json @@ -108,7 +108,6 @@ "Name[zh_TW]": "桌面變更時的螢幕顯示", "Version": "1.0" }, - "X-KWin-Exclude-Listing": "true", "X-Plasma-API": "declarativescript", "X-Plasma-MainScript": "ui/main.qml" }