GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
ModuleSO.h
1
29
#pragma once
30
31
namespace
GpgFrontend
{
32
33
struct
ModuleSO
{
34
QString module_id;
35
QString module_version;
36
QString module_hash;
37
bool
auto_activate;
38
39
ModuleSO
() =
default
;
40
41
explicit
ModuleSO
(
const
QJsonObject& j) {
42
if
(
const
auto
v = j[
"module_id"
]; v.isString()) {
43
module_id = v.toString();
44
}
45
46
if
(
const
auto
v = j[
"module_version"
]; v.isString()) {
47
module_version = v.toString();
48
}
49
50
if
(
const
auto
v = j[
"module_hash"
]; v.isString()) {
51
module_hash = v.toString();
52
}
53
54
if
(
const
auto
v = j[
"auto_activate"
]; v.isBool()) {
55
auto_activate = v.toBool();
56
}
57
}
58
59
[[nodiscard]]
auto
ToJson()
const
-> QJsonObject {
60
QJsonObject j;
61
j[
"module_id"
] = module_id;
62
j[
"module_version"
] = module_version;
63
j[
"module_hash"
] = module_hash;
64
j[
"auto_activate"
] = auto_activate;
65
return
j;
66
}
67
};
68
}
// namespace GpgFrontend
GpgFrontend
Definition:
app.cpp:39
GpgFrontend::ModuleSO
Definition:
ModuleSO.h:33
src
core
struct
settings_object
ModuleSO.h
Generated by
1.9.1