Changeset View
Changeset View
Standalone View
Standalone View
kcms/runners/kcm.cpp
Context not available. | |||||
53 | setAboutData(about); | 53 | setAboutData(about); | ||
---|---|---|---|---|---|
54 | setButtons(Apply | Default); | 54 | setButtons(Apply | Default); | ||
55 | 55 | | |||
56 | if(!args.at(0).toString().isEmpty()) { | ||||
57 | m_pluginID = args.at(0).toString(); | ||||
58 | } | ||||
59 | | ||||
56 | QVBoxLayout* layout = new QVBoxLayout(this); | 60 | QVBoxLayout* layout = new QVBoxLayout(this); | ||
57 | 61 | | |||
58 | QHBoxLayout *headerLayout = new QHBoxLayout(this); | 62 | QHBoxLayout *headerLayout = new QHBoxLayout(this); | ||
Context not available. | |||||
74 | 78 | | |||
75 | m_pluginSelector = new KPluginSelector(this); | 79 | m_pluginSelector = new KPluginSelector(this); | ||
76 | 80 | | |||
77 | auto markAsChanged = [this] { | 81 | connect(m_pluginSelector, &KPluginSelector::changed, this, &SearchConfigModule::markAsChanged); | ||
78 | emit changed(); | 82 | connect(m_pluginSelector, &KPluginSelector::configCommitted, this, &SearchConfigModule::markAsChanged); | ||
79 | }; | | |||
80 | connect(m_pluginSelector, &KPluginSelector::changed, this, markAsChanged); | | |||
81 | connect(m_pluginSelector, &KPluginSelector::configCommitted, this, markAsChanged); | | |||
82 | 83 | | |||
83 | #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 67, 0) | 84 | #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 67, 0) | ||
84 | connect(m_pluginSelector, &KPluginSelector::defaulted, | 85 | connect(m_pluginSelector, &KPluginSelector::defaulted, this, &KCModule::defaulted); | ||
85 | this, &KCModule::defaulted); | | |||
86 | #endif | 86 | #endif | ||
87 | 87 | | |||
88 | layout->addLayout(headerLayout); | 88 | layout->addLayout(headerLayout); | ||
Context not available. | |||||
100 | m_pluginSelector->addPlugins(Plasma::RunnerManager::listRunnerInfo(), | 100 | m_pluginSelector->addPlugins(Plasma::RunnerManager::listRunnerInfo(), | ||
101 | KPluginSelector::ReadConfigFile, | 101 | KPluginSelector::ReadConfigFile, | ||
102 | i18n("Available Plugins"), QString(), | 102 | i18n("Available Plugins"), QString(), | ||
103 | KSharedConfig::openConfig(QLatin1String( "krunnerrc" ))); | 103 | KSharedConfig::openConfig(QStringLiteral( "krunnerrc" ))); | ||
104 | m_pluginSelector->load(); | 104 | m_pluginSelector->load(); | ||
105 | | ||||
106 | if(!m_pluginID.isEmpty()){ | ||||
107 | m_pluginSelector->showConfiguration(m_pluginID); | ||||
108 | } | ||||
105 | } | 109 | } | ||
106 | 110 | | |||
107 | 111 | | |||
Context not available. |