Commit b473fed7 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kcms/plasmasearch] Enable Apply button when resetting to defaults

setConfig must be called before addPlugins, otherwise the model emits the wrong defaults state

We must call setNeedsSave when setting to defaults

We must connect defaulted to setRepresentsDefaults, not its getter
parent db0e1622
Pipeline #230078 passed with stage
in 5 minutes and 10 seconds
......@@ -55,7 +55,10 @@ SearchConfigModule::SearchConfigModule(QObject *parent, const KPluginMetaData &d
qDBusRegisterMetaType<QHash<QString, QByteArrayList>>();
connect(m_model, &KPluginModel::defaulted, this, &SearchConfigModule::representsDefaults);
connect(m_model, &KPluginModel::defaulted, this, [this](bool isDefaults) {
connect(m_model, &KPluginModel::isSaveNeededChanged, this, [this]() {
......@@ -80,8 +83,8 @@ void SearchConfigModule::reloadPlugins()
m_model->addPlugins(Plasma::RunnerManager::runnerMetaDataList(), i18n("Available Plugins"));
m_model->addPlugins(Plasma::RunnerManager::runnerMetaDataList(), i18n("Available Plugins"));
void SearchConfigModule::showKCM(const KPluginMetaData &data, const QStringList args) const
Supports Markdown
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