aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-08 15:00:22 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-08 15:00:22 +0200
commit99917ab581314f9517569401bc79e150e4ce0881 (patch)
treebed6fa884a0925e104f9e15c399c1b5e91683a2b /lib/configuration
parentImprove plugin loading (diff)
downloadsmolbote-99917ab581314f9517569401bc79e150e4ce0881.tar.xz
Better profile loading
First load all profiles from profile.path, and then the profile.default if missing, after which set the default profile. Profile names and whether they're otr can be set by .profile name=string and otr=bool.
Diffstat (limited to 'lib/configuration')
-rw-r--r--lib/configuration/configuration.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/configuration/configuration.h b/lib/configuration/configuration.h
index 1df6bb5..59c837c 100644
--- a/lib/configuration/configuration.h
+++ b/lib/configuration/configuration.h
@@ -49,7 +49,8 @@ public:
}
if constexpr(std::is_same_v<T, QString>) {
- return std::optional<QString>(vm[path].as<const char*>());
+ return std::optional<QString>(QString::fromStdString(this->value<std::string>(path).value()));
+ //return std::optional<QString>(vm[path].as<const char*>());
} else if constexpr(std::is_same_v<T, std::string>) {