summaryrefslogtreecommitdiffhomepage
path: root/opentrack/options.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-04 09:19:39 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-04 09:29:28 +0200
commitf58efb5c2c51e5866d4640036865792b822641f6 (patch)
tree4316d898c27c3adb1c332544876445ba73bd1eb0 /opentrack/options.hpp
parent27bbb01ff3d49bd37daa9649f5c2320663c46aa4 (diff)
parent0bf534ff329cabaa61a0dddb8671827577407aba (diff)
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'opentrack/options.hpp')
-rw-r--r--opentrack/options.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/opentrack/options.hpp b/opentrack/options.hpp
index 06697631..c2fe8705 100644
--- a/opentrack/options.hpp
+++ b/opentrack/options.hpp
@@ -38,6 +38,10 @@
#include <memory>
template<typename t> using mem = std::shared_ptr<t>;
+#define OPENTRACK_CONFIG_FILENAME_KEY "settings-file"
+#define OPENTRACK_DEFAULT_CONFIG_PATH "/settings/default.ini"
+#define OPENTRACK_ORG "TrackHat opentrack-2.3"
+
namespace options {
template<typename k, typename v>
using map = std::map<k, v>;
@@ -97,7 +101,6 @@ namespace options {
}
conf.endGroup();
}
- static constexpr const char* org = "trackhat opentrack-2.3";
void save()
{
@@ -129,13 +132,10 @@ namespace options {
return kvs.count(s) != 0;
}
- static constexpr const char* filename_key = "settings-file";
- static constexpr const char* default_path = "/settings/default.ini";
-
static const QString ini_pathname()
{
- QSettings settings(group::org);
- return settings.value(filename_key, QCoreApplication::applicationDirPath() + default_path).toString();
+ QSettings settings(OPENTRACK_ORG);
+ return settings.value(OPENTRACK_CONFIG_FILENAME_KEY, QCoreApplication::applicationDirPath() + OPENTRACK_DEFAULT_CONFIG_PATH).toString();
}
static const QStringList ini_list()