From c9691b5855aa111cc013db111ce2e9390466248f Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 13 Jan 2023 02:46:00 +0100 Subject: [PATCH] kcms/tabbox: Don't offer switcher from global themes that don't actually ship a switcher Some global themes, e.g. Breeze Dark, don't ship a switcher and instead point to the one from the Beeze global theme They do show up in the selection though, which is confusing and doesn't actually work --- src/kcms/tabbox/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kcms/tabbox/main.cpp b/src/kcms/tabbox/main.cpp index 101b00784e..398d12f262 100644 --- a/src/kcms/tabbox/main.cpp +++ b/src/kcms/tabbox/main.cpp @@ -144,9 +144,15 @@ void KWinTabBoxConfig::initLayoutLists() const auto lnfPackages = availableLnFPackages(); for (const auto &package : lnfPackages) { const auto &metaData = package.metadata(); + + const QString switcherFile = package.filePath("windowswitcher", QStringLiteral("WindowSwitcher.qml")); + if (switcherFile.isEmpty()) { + // Skip lnfs that don't actually ship a switcher + continue; + } layoutNames << metaData.name(); layoutPlugins << metaData.pluginId(); - layoutPaths << package.filePath("windowswitcher", QStringLiteral("WindowSwitcher.qml")); + layoutPaths << switcherFile; } for (const auto &offer : offers) {