GIT_SILENT: Adapt to KConfigGroup name officially being a QString type
This commit is contained in:
parent
8595b6ef88
commit
b61f32262e
3 changed files with 5 additions and 5 deletions
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue