Commit 766ae9c5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add save method

parent 6210783b
......@@ -50,3 +50,11 @@ QPair<QStringList, QStringList> PimCommon::PluginUtil::loadPluginSetting(const Q
pair.second = disabledPlugins;
return pair;
}
void PimCommon::PluginUtil::savePluginSettings(const QString &groupName, const QString &prefixSettingKey, const QStringList &enabledPluginsList, const QStringList &disabledPluginsList)
{
KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("pimpluginsrc"));
KConfigGroup grp = config->group(groupName);
grp.writeEntry(QStringLiteral("%1Enabled").arg(prefixSettingKey), enabledPluginsList);
grp.writeEntry(QStringLiteral("1Disabled").arg(prefixSettingKey), disabledPluginsList);
}
......@@ -31,6 +31,7 @@ namespace PluginUtil
{
PIMCOMMON_EXPORT bool isPluginActivated(const QStringList &enabledPluginsList, const QStringList &disabledPluginsList, bool isEnabledByDefault, const QString &pluginId);
PIMCOMMON_EXPORT QPair<QStringList, QStringList> loadPluginSetting(const QString &groupName, const QString &prefixSettingKey);
PIMCOMMON_EXPORT void savePluginSettings(const QString &groupName, const QString &prefixSettingKey, const QStringList &enabledPluginsList, const QStringList &disabledPluginsList);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment