diff --git a/core/device.cpp b/core/device.cpp index c9bb1fa3b..a45f2fa87 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -427,7 +427,7 @@ void Device::setPluginEnabled(const QString &pluginName, bool enabled) return; } - KConfigGroup pluginStates = KSharedConfig::openConfig(pluginsConfigFile())->group("Plugins"); + KConfigGroup pluginStates = KSharedConfig::openConfig(pluginsConfigFile())->group(QStringLiteral("Plugins")); const QString enabledKey = pluginName + QStringLiteral("Enabled"); pluginStates.writeEntry(enabledKey, enabled); @@ -437,7 +437,7 @@ void Device::setPluginEnabled(const QString &pluginName, bool enabled) bool Device::isPluginEnabled(const QString &pluginName) const { const QString enabledKey = pluginName + QStringLiteral("Enabled"); - KConfigGroup pluginStates = KSharedConfig::openConfig(pluginsConfigFile())->group("Plugins"); + KConfigGroup pluginStates = KSharedConfig::openConfig(pluginsConfigFile())->group(QStringLiteral("Plugins")); return (pluginStates.hasKey(enabledKey) ? pluginStates.readEntry(enabledKey, false) : PluginLoader::instance()->getPluginInfo(pluginName).isEnabledByDefault()); diff --git a/interfaces/pluginmodel.cpp b/interfaces/pluginmodel.cpp index 83fd95fa5..26c50d03c 100644 --- a/interfaces/pluginmodel.cpp +++ b/interfaces/pluginmodel.cpp @@ -46,7 +46,7 @@ QVariant PluginModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::CheckStateRole: { const QString def = pluginEntry.isEnabledByDefault() ? QStringLiteral("true") : QStringLiteral("false"); - return m_config->group("Plugins").readEntry(QStringLiteral("%1Enabled").arg(pluginEntry.pluginId()), def) == QStringLiteral("true"); + return m_config->group(QStringLiteral("Plugins")).readEntry(QStringLiteral("%1Enabled").arg(pluginEntry.pluginId()), def) == QStringLiteral("true"); } case Qt::DisplayRole: return pluginEntry.name(); @@ -91,7 +91,7 @@ bool PluginModel::setData(const QModelIndex &index, const QVariant &value, int r if (role == Qt::CheckStateRole) { const KPluginMetaData &pluginEntry = m_plugins[index.row()]; - m_config->group("Plugins").writeEntry(QStringLiteral("%1Enabled").arg(pluginEntry.pluginId()), value); + m_config->group(QStringLiteral("Plugins")).writeEntry(QStringLiteral("%1Enabled").arg(pluginEntry.pluginId()), value); ret = true; } diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index cf4df9e97..d6b5642dc 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -204,7 +204,7 @@ void KdeConnectKcm::resetDeviceView() kcmUi.pluginSelector->clear(); kcmUi.pluginSelector->setConfigurationArguments({currentDevice->id()}); kcmUi.pluginSelector->addPlugins(availablePluginInfo, i18n("Available plugins")); - kcmUi.pluginSelector->setConfig(deviceConfig->group("Plugins")); + kcmUi.pluginSelector->setConfig(deviceConfig->group(QStringLiteral("Plugins"))); } void KdeConnectKcm::requestPairing()