Fix opening runcommand settings

We only get the device id via args, not the plugin id

We also don't need it, we can get the plugin id from the metadata
This commit is contained in:
Nicolas Fella 2023-12-14 00:45:39 +01:00
parent 4c27574a75
commit 5d0b2c4c73

View file

@ -14,7 +14,7 @@ KdeConnectPluginKcm::KdeConnectPluginKcm(QObject *parent, const KPluginMetaData
#endif
, m_deviceId(args.at(0).toString())
// The plugin name is the KCMs ID with the postfix removed
, m_config(new KdeConnectPluginConfig(m_deviceId, args.at(1).toString().remove(QLatin1String("_config")), this))
, m_config(new KdeConnectPluginConfig(m_deviceId, data.pluginId().remove(QLatin1String("_config")), this))
{
Q_ASSERT(data.isValid()); // Even if we have empty metadata, it should be valid!
}