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
This commit is contained in:
Nicolas Fella 2023-01-13 02:46:00 +01:00 committed by Vlad Zahorodnii
parent dbf50d3af5
commit c9691b5855

View file

@ -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) {