diff --git a/HACKING b/HACKING --- a/HACKING +++ b/HACKING @@ -17,5 +17,5 @@ https://community.kde.org/Policies/Kdelibs_Coding_Style Existing code that does not follow this style should be migrated over during -editting. +editing. diff --git a/kcms/runners/kcm.h b/kcms/runners/kcm.h --- a/kcms/runners/kcm.h +++ b/kcms/runners/kcm.h @@ -46,6 +46,7 @@ private: KPluginSelector *m_pluginSelector; KConfig m_config; + QString m_pluginID; }; #endif diff --git a/kcms/runners/kcm.cpp b/kcms/runners/kcm.cpp --- a/kcms/runners/kcm.cpp +++ b/kcms/runners/kcm.cpp @@ -53,6 +53,10 @@ setAboutData(about); setButtons(Apply | Default); + if(!args.at(0).toString().isEmpty()) { + m_pluginID = args.at(0).toString(); + } + QVBoxLayout* layout = new QVBoxLayout(this); QHBoxLayout *headerLayout = new QHBoxLayout(this); @@ -74,15 +78,11 @@ m_pluginSelector = new KPluginSelector(this); - auto markAsChanged = [this] { - emit changed(); - }; - connect(m_pluginSelector, &KPluginSelector::changed, this, markAsChanged); - connect(m_pluginSelector, &KPluginSelector::configCommitted, this, markAsChanged); + connect(m_pluginSelector, &KPluginSelector::changed, this, &SearchConfigModule::markAsChanged); + connect(m_pluginSelector, &KPluginSelector::configCommitted, this, &SearchConfigModule::markAsChanged); #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 67, 0) - connect(m_pluginSelector, &KPluginSelector::defaulted, - this, &KCModule::defaulted); + connect(m_pluginSelector, &KPluginSelector::defaulted, this, &KCModule::defaulted); #endif layout->addLayout(headerLayout); @@ -100,8 +100,12 @@ m_pluginSelector->addPlugins(Plasma::RunnerManager::listRunnerInfo(), KPluginSelector::ReadConfigFile, i18n("Available Plugins"), QString(), - KSharedConfig::openConfig(QLatin1String( "krunnerrc" ))); + KSharedConfig::openConfig(QStringLiteral( "krunnerrc" ))); m_pluginSelector->load(); + + if(!m_pluginID.isEmpty()){ + m_pluginSelector->showConfiguration(m_pluginID); + } }