Commit 21dbf041 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

kcm: Fix showing plugins' configuration

We were using the plugin infrastructure to tell the name of the plugin
we were configuring.

Since this doesn't make any sense, just let the kcms themselves define
where they want their settings to be.

This fixes a regression from when we ported away from using KService to
list them. e365e1b3
parent a09825c4
Pipeline #153616 passed with stage
in 1 minute and 27 seconds
......@@ -13,18 +13,17 @@ struct KdeConnectPluginKcmPrivate
{
QString m_deviceId;
QString m_pluginName;
KdeConnectPluginConfig* m_config;
KdeConnectPluginConfig* m_config = nullptr;
};
KdeConnectPluginKcm::KdeConnectPluginKcm(QWidget* parent, const QVariantList& args, const QString& componentName)
KdeConnectPluginKcm::KdeConnectPluginKcm(QWidget* parent, const QVariantList& args, const QString& pluginName)
: KCModule(parent, args)
, d(new KdeConnectPluginKcmPrivate())
{
d->m_deviceId = args.at(0).toString();
//The parent of the config should be the plugin itself
d->m_pluginName = KService::serviceByDesktopName(componentName).constData()->property(QStringLiteral("X-KDE-ParentComponents")).toString();
d->m_pluginName = pluginName;
//The parent of the config should be the plugin itself
d->m_config = new KdeConnectPluginConfig(d->m_deviceId, d->m_pluginName);
}
......
......@@ -20,7 +20,7 @@ K_PLUGIN_FACTORY(FindThisDeviceConfigFactory, registerPlugin<FindThisDeviceConfi
FindThisDeviceConfig::FindThisDeviceConfig(QWidget* parent, const QVariantList& args)
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_findthisdevice_config"))
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_findthisdevice"))
, m_ui(new Ui::FindThisDeviceConfigUi())
{
m_ui->setupUi(this);
......
......@@ -12,7 +12,7 @@
K_PLUGIN_FACTORY(PauseMusicConfigFactory, registerPlugin<PauseMusicConfig>();)
PauseMusicConfig::PauseMusicConfig(QWidget* parent, const QVariantList& args)
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_pausemusic_config"))
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_pausemusic"))
, m_ui(new Ui::PauseMusicConfigUi())
{
m_ui->setupUi(this);
......
......@@ -26,7 +26,7 @@ K_PLUGIN_FACTORY(ShareConfigFactory, registerPlugin<RunCommandConfig>();)
RunCommandConfig::RunCommandConfig(QWidget* parent, const QVariantList& args)
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_runcommand_config"))
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_runcommand"))
{
// The qdbus executable name is different on some systems
QString qdbusExe = QStringLiteral("qdbus-qt5");
......
......@@ -14,7 +14,7 @@
K_PLUGIN_FACTORY(SendNotificationsConfigFactory, registerPlugin<SendNotificationsConfig>();)
SendNotificationsConfig::SendNotificationsConfig(QWidget* parent, const QVariantList& args)
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_sendnotifications_config"))
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_sendnotifications"))
, m_ui(new Ui::SendNotificationsConfigUi())
, appModel(new NotifyingApplicationModel)
{
......
......@@ -15,7 +15,7 @@
K_PLUGIN_FACTORY(ShareConfigFactory, registerPlugin<ShareConfig>();)
ShareConfig::ShareConfig(QWidget* parent, const QVariantList& args)
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_share_config"))
: KdeConnectPluginKcm(parent, args, QStringLiteral("kdeconnect_share"))
, m_ui(new Ui::ShareConfigUi())
{
m_ui->setupUi(this);
......
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