21dbf0410f
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. e365e1b35c
45 lines
1 KiB
C++
45 lines
1 KiB
C++
/**
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
*/
|
|
|
|
#include "kdeconnectpluginkcm.h"
|
|
|
|
#include <KAboutData>
|
|
#include <KService>
|
|
|
|
struct KdeConnectPluginKcmPrivate
|
|
{
|
|
QString m_deviceId;
|
|
QString m_pluginName;
|
|
KdeConnectPluginConfig* m_config = nullptr;
|
|
};
|
|
|
|
KdeConnectPluginKcm::KdeConnectPluginKcm(QWidget* parent, const QVariantList& args, const QString& pluginName)
|
|
: KCModule(parent, args)
|
|
, d(new KdeConnectPluginKcmPrivate())
|
|
{
|
|
d->m_deviceId = args.at(0).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);
|
|
}
|
|
|
|
KdeConnectPluginKcm::~KdeConnectPluginKcm()
|
|
{
|
|
delete d->m_config;
|
|
}
|
|
|
|
KdeConnectPluginConfig* KdeConnectPluginKcm::config() const
|
|
{
|
|
return d->m_config;
|
|
}
|
|
|
|
QString KdeConnectPluginKcm::deviceId() const
|
|
{
|
|
return d->m_deviceId;
|
|
}
|
|
|
|
|