Initialize plugin and device name in KdeConnectPluginKcm constructor

Currently they are only set from the setters which leads to surprising
results when querying them after using the constructor to set them.
This commit is contained in:
David Redondo 2024-07-01 14:11:47 +02:00
parent d9cc35c7f2
commit 551af5fcac

View file

@ -30,6 +30,8 @@ KdeConnectPluginConfig::KdeConnectPluginConfig(QObject *parent)
KdeConnectPluginConfig::KdeConnectPluginConfig(const QString &deviceId, const QString &pluginName, QObject *parent)
: QObject(parent)
, d(new KdeConnectPluginConfigPrivate())
, m_deviceId(deviceId)
, m_pluginName(pluginName)
{
d->m_configDir = KdeConnectConfig::instance().pluginConfigDir(deviceId, pluginName);
QDir().mkpath(d->m_configDir.path());