diff --git a/kcmkwin/kwindecoration/decorationmodel.cpp b/kcmkwin/kwindecoration/decorationmodel.cpp --- a/kcmkwin/kwindecoration/decorationmodel.cpp +++ b/kcmkwin/kwindecoration/decorationmodel.cpp @@ -157,6 +157,7 @@ d.pluginName = info.pluginName(); d.themeName = it.value().toString(); d.visibleName = it.key(); + qWarning() << "**TEST** Adding plugin with metadata: " << d.pluginName << d.themeName << d.visibleName; QMetaObject::invokeMethod(themeFinder.data(), "hasConfiguration", Q_RETURN_ARG(bool, d.configuration), Q_ARG(QString, d.themeName)); @@ -170,8 +171,9 @@ } Data data; data.pluginName = info.pluginName(); - data.visibleName = info.name().isEmpty() ? info.pluginName() : info.name(); + data.visibleName = data.themeName = info.name().isEmpty() ? info.pluginName() : info.name(); data.configuration = config; + qWarning() << "**TEST** Adding plugin: " << data.pluginName << data.themeName; m_plugins.emplace_back(std::move(data)); } @@ -182,7 +184,11 @@ { auto it = std::find_if(m_plugins.cbegin(), m_plugins.cend(), [pluginName, themeName](const Data &d) { - return d.pluginName == pluginName && d.themeName == themeName; + if (themeName.isEmpty()) { + return d.pluginName == pluginName; + } else { + return d.pluginName == pluginName && d.themeName == themeName; + } } ); if (it == m_plugins.cend()) { diff --git a/kcmkwin/kwindecoration/kcm.cpp b/kcmkwin/kwindecoration/kcm.cpp --- a/kcmkwin/kwindecoration/kcm.cpp +++ b/kcmkwin/kwindecoration/kcm.cpp @@ -314,7 +314,12 @@ m_ui->borderSizesCombo->setCurrentIndex(m_ui->borderSizesCombo->findData(border)); int themeIndex = m_proxyModel->mapFromSource(m_model->findDecoration(plugin, theme)).row(); - m_quickView->rootContext()->setContextProperty("initialThemeIndex", themeIndex); + qWarning() << "**TEST** current plugin on load: " << plugin << theme << themeIndex; + if (auto listView = m_quickView->rootObject()->findChild("listView")) { + listView->setProperty("currentIndex", themeIndex); + } else { + m_quickView->rootContext()->setContextProperty("initialThemeIndex", themeIndex); + } // buttons const auto &left = readDecorationButtons(config, "ButtonsOnLeft", QVector{