aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig7
-rw-r--r--lib/configuration/test/main.cpp16
-rwxr-xr-xscripts/gen-default-cfg.py4
3 files changed, 10 insertions, 17 deletions
diff --git a/Kconfig b/Kconfig
index ed8dbdf..8a2f934 100644
--- a/Kconfig
+++ b/Kconfig
@@ -185,10 +185,3 @@ config session.path
string "Session location"
default "~/.config/smolbote/session.d"
-menu "Workarounds"
- config QTBUG_65223
- bool "Manually emit loadFinished"
- default y
- help
- See QTBUG-65223: loadStarted is emitted twice when loading link with anchor
-endmenu
diff --git a/lib/configuration/test/main.cpp b/lib/configuration/test/main.cpp
index 06f7cb0..d83f7af 100644
--- a/lib/configuration/test/main.cpp
+++ b/lib/configuration/test/main.cpp
@@ -17,16 +17,16 @@ SCENARIO("Configuration")
{ "other", std::string("not in cfg") },
// commented out entry in the conf file
{ "comment", std::string("123.456") },
- { "number", int(0) },
- { "toggle", bool(false) },
+ { "number", 0 },
+ { "toggle", false },
{ "main/name", std::string() },
- { "main/number", int(0) },
- { "main/toggle", bool(true) },
+ { "main/number", 0 },
+ { "main/toggle", true },
{ "extra/name", std::string() },
- { "extra/number", int(0) },
- { "extra/toggle", bool(false) },
+ { "extra/number", 0 },
+ { "extra/toggle", false },
};
WHEN("reading default values")
@@ -132,8 +132,8 @@ SCENARIO("Configuration")
{
std::unique_ptr<Configuration> global_conf = std::make_unique<Configuration, std::initializer_list<std::pair<std::string, conf_value_t>>>({
{ "name", std::string("global") },
- { "number", int(123) },
- { "toggle", bool(true) },
+ { "number", 123 },
+ { "toggle", true },
});
diff --git a/scripts/gen-default-cfg.py b/scripts/gen-default-cfg.py
index dc88ceb..c27b482 100755
--- a/scripts/gen-default-cfg.py
+++ b/scripts/gen-default-cfg.py
@@ -8,10 +8,10 @@ def node_to_str(node):
if(node.item.type == kconfiglib.STRING):
return "std::string(\"" + node.item.str_value + "\")"
elif(node.item.type == kconfiglib.INT):
- return "int(" + node.item.str_value + ")"
+ return node.item.str_value
elif(node.item.type == kconfiglib.BOOL):
tri_val_str = ("false", "unknown", "true")[node.item.tri_value]
- return "bool(" + tri_val_str + ")"
+ return tri_val_str
return None