1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #include "pluginsetting.h" |
6 | #include "private/pluginmetaobject_p.h" |
7 | |
8 | DPF_USE_NAMESPACE |
9 | |
10 | PluginSetting::PluginSetting(QSettings::Scope scope, const QString &organization, |
11 | const QString &application, QObject *parent) |
12 | : QSettings(scope,organization,application,parent) |
13 | { |
14 | |
15 | } |
16 | |
17 | void PluginSetting::setPluginEnable(const PluginMetaObject &meta, bool enabled) |
18 | { |
19 | beginGroup(meta.name()); |
20 | setValue(PLUGIN_VERSION, meta.version()); |
21 | setValue(ENABLED, enabled); |
22 | endGroup(); |
23 | } |
24 | |