diff options
author | Saturneric <[email protected]> | 2022-02-06 13:13:03 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-02-06 13:13:03 +0000 |
commit | aa3e4dcef32828707f9da8d9800ac13caa24c547 (patch) | |
tree | f1f5001d0093eb0420eeab0761d3f3b432859d23 /src/ui/struct/SettingsObject.h | |
parent | <fix>(src): Do not catch any exceptions when debugging (diff) | |
download | GpgFrontend-aa3e4dcef32828707f9da8d9800ac13caa24c547.tar.gz GpgFrontend-aa3e4dcef32828707f9da8d9800ac13caa24c547.zip |
<feat>(ui): Improve the security settings auxiliary class
1. Do a type check
2. Do a null check
3. Add some necessary logs
Diffstat (limited to '')
-rw-r--r-- | src/ui/struct/SettingsObject.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/struct/SettingsObject.h b/src/ui/struct/SettingsObject.h index 0bc760c8..653a543f 100644 --- a/src/ui/struct/SettingsObject.h +++ b/src/ui/struct/SettingsObject.h @@ -36,7 +36,8 @@ namespace GpgFrontend::UI { /** - * @brief + * @brief The SettingsObject class + * This class is used to store settings for the application securely. * */ class SettingsObject : public nlohmann::json { @@ -44,7 +45,7 @@ class SettingsObject : public nlohmann::json { /** * @brief Construct a new Settings Object object * - * @param settings_name + * @param settings_name The name of the settings object */ explicit SettingsObject(std::string settings_name); @@ -68,7 +69,7 @@ class SettingsObject : public nlohmann::json { * @param default_value * @return nlohmann::json& */ - nlohmann::json& Check(const std::string& key, nlohmann::json default_value); + nlohmann::json& Check(const std::string& key, const nlohmann::json& default_value); /** * @brief |