aboutsummaryrefslogtreecommitdiff
path: root/src/settings.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.h.in')
-rw-r--r--src/settings.h.in32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/settings.h.in b/src/settings.h.in
deleted file mode 100644
index 88fbcf5..0000000
--- a/src/settings.h.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-#include <QStandardPaths>
-#include <configuration.h>
-#include <fstream>
-
-inline const std::string init_conf(const std::string &path)
-{
- auto value_map = std::make_unique<Configuration, std::initializer_list<std::pair<std::string, conf_value_t>>>({
- @__DEFAULT_CFG__
- });
-
- const std::string cfgpath = [&]() {
- if(path.empty())
- return value_map->value<std::string>("poi.cfg.path").value();
-
- auto p = path;
- if(p.front() == '~')
- p.replace(0, 1, QStandardPaths::writableLocation(QStandardPaths::HomeLocation).toStdString());
- return p;
- }();
-
- std::fstream fs;
- fs.open(cfgpath, std::fstream::in);
- if(fs.is_open()) {
- value_map->read(fs);
- fs.close();
- }
-
- Configuration::move_global(std::move(value_map));
- return cfgpath;
-}