aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-05-04 21:03:14 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-05-04 21:03:14 +0200
commit591e25eb4431e44e8ae28da299e2f024a95c2c03 (patch)
tree5963ced1a971fb630d70125b4b03cc9da3e8c8e2 /lib/configuration
parentMerge address bar menus (diff)
downloadsmolbote-591e25eb4431e44e8ae28da299e2f024a95c2c03.tar.xz
Stylesheet load setting
Diffstat (limited to 'lib/configuration')
-rw-r--r--lib/configuration/configuration.cpp2
-rw-r--r--lib/configuration/configuration.h6
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;