Verified Commit 599d888e authored by Fushan Wen's avatar Fushan Wen
Browse files

fixup! kcms/runners: Move KRunner settings to individual KCM

parent aa74199f
Pipeline #151378 passed with stage
in 3 minutes and 29 seconds
......@@ -80,14 +80,9 @@ SearchConfigModule::SearchConfigModule(QWidget *parent, const QVariantList &args
m_krunnerSettingsButton = new QPushButton(QIcon::fromTheme(QStringLiteral("krunner")), QStringLiteral("Configure KRunner…"), this);
connect(m_krunnerSettingsButton, &QPushButton::clicked, this, [this] {
if (!m_krunnerSettingsDialog) {
const KPluginMetaData krunnerModule(QPluginLoader("plasma/kcms/desktop/kcm_krunnersettings"));
if (krunnerModule.isValid()) {
m_krunnerSettingsDialog = new KCMultiDialog(this);
m_krunnerSettingsDialog->addModule(krunnerModule, {QLatin1String("openedFromPluginSettings")});
} else {
return;
}
m_krunnerSettingsDialog = new KCMultiDialog(this);
m_krunnerSettingsDialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/desktop/kcm_krunnersettings")),
{QStringLiteral("openedFromPluginSettings")});
}
m_krunnerSettingsDialog->show();
......
{
"KPlugin": {
"Authors": [
{
"Email": "qydwhotmail@gmail.com",
"Name": "Fushan Wen"
}
],
"Description": "Configure KRunner behavior",
"FormFactors": [
"desktop",
"handset",
"tablet"
],
"Icon": "krunner",
"Id": "kcm_krunnersettings",
"License": "GPL",
"Name": "KRunner Settings",
"Version": "0.1"
"Name": "KRunner Settings"
}
}
......@@ -30,7 +30,7 @@ KRunnerSettings::KRunnerSettings(QObject *parent, const KPluginMetaData &metaDat
->group("PlasmaRunnerManager")
.group("History"))
, m_historyKeys(m_historyConfigGroup.keyList())
, m_doesShowPluginButton(args.size() == 0 || args.constFirst() != QLatin1String("openedFromPluginSettings"))
, m_doesShowPluginButton(args.isEmpty() || args.constFirst() != QLatin1String("openedFromPluginSettings"))
{
qmlRegisterType<KRunnerSettingsBase>();
......@@ -41,10 +41,6 @@ KRunnerSettings::KRunnerSettings(QObject *parent, const KPluginMetaData &metaDat
connect(m_consumer, &KActivities::Consumer::activitiesChanged, this, &KRunnerSettings::hasSingleHistoryChanged);
}
KRunnerSettings::~KRunnerSettings()
{
}
KRunnerSettingsBase *KRunnerSettings::krunnerSettings() const
{
return m_data->settings();
......
......@@ -37,7 +37,6 @@ class KRunnerSettings : public KQuickAddons::ManagedConfigModule
public:
KRunnerSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~KRunnerSettings() override;
KRunnerSettingsBase *krunnerSettings() 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