diff options
Diffstat (limited to 'lib/configuration')
-rw-r--r-- | lib/configuration/configuration.cpp | 2 | ||||
-rw-r--r-- | lib/configuration/configuration.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/configuration/configuration.cpp b/lib/configuration/configuration.cpp index 6351348..1829a5e 100644 --- a/lib/configuration/configuration.cpp +++ b/lib/configuration/configuration.cpp @@ -53,6 +53,8 @@ Configuration::Configuration() ; configuration_desc.add_options() + ("browser.stylesheet", po::value<std::string>()) + // main window ui ("mainwindow.height", po::value<int>()->default_value(720)) ("mainwindow.width", po::value<int>()->default_value(1280)) diff --git a/lib/configuration/configuration.h b/lib/configuration/configuration.h index 5bb9f5d..af75122 100644 --- a/lib/configuration/configuration.h +++ b/lib/configuration/configuration.h @@ -31,11 +31,13 @@ public: { // if setting doesn't exist, we crash // in debug builds, check if setting exists -#ifdef QT_DEBUG + if(vm.count(path) == 0) { +#ifdef QT_DEBUG qWarning("value(%s) does not exist, probably crashing now", path); - } #endif + return std::nullopt; + } if constexpr(std::is_same_v<T, std::string>) { std::string r; |