aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/struct/SettingsObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/struct/SettingsObject.cpp')
-rw-r--r--src/ui/struct/SettingsObject.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ui/struct/SettingsObject.cpp b/src/ui/struct/SettingsObject.cpp
index 5405611e..63df0900 100644
--- a/src/ui/struct/SettingsObject.cpp
+++ b/src/ui/struct/SettingsObject.cpp
@@ -36,12 +36,11 @@ nlohmann::json& GpgFrontend::UI::SettingsObject::Check(
this->nlohmann::json::operator=(nlohmann::json::object());
}
- LOG(INFO) << "Checking key: " << key;
-
try {
if (!this->nlohmann::json::contains(key) ||
this->nlohmann::json::at(key).is_null() ||
- this->nlohmann::json::at(key).type() != default_value.type()) {
+ this->nlohmann::json::at(key).type_name() !=
+ default_value.type_name()) {
LOG(INFO) << "Added missing key: " << key;
if (default_value.is_null()) {
LOG(WARNING) << "Default value is null, using empty object";
@@ -65,8 +64,6 @@ GpgFrontend::UI::SettingsObject GpgFrontend::UI::SettingsObject::Check(
this->nlohmann::json::operator=(nlohmann::json::object());
}
- LOG(INFO) << "Checking key: " << key;
-
if (!nlohmann::json::contains(key) ||
this->nlohmann::json::at(key).is_null() ||
this->nlohmann::json::at(key).type() != nlohmann::json::value_t::object) {