aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-07-05 07:19:12 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-07-05 07:19:12 +0200
commite308741fd9ea2cc6f7ea65e66967909974765b78 (patch)
tree1ca2c1f35010bc94f82d4a4f468941bf937dc918 /lib
parentAdd configuration/defaults.h (diff)
downloadsmolbote-e308741fd9ea2cc6f7ea65e66967909974765b78.tar.xz
Update translations
Diffstat (limited to 'lib')
-rw-r--r--lib/configuration/configuration.cpp4
-rw-r--r--lib/configuration/defaults.h.win322
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/configuration/configuration.cpp b/lib/configuration/configuration.cpp
index cae21fd..5da7fb4 100644
--- a/lib/configuration/configuration.cpp
+++ b/lib/configuration/configuration.cpp
@@ -18,6 +18,9 @@ namespace po = boost::program_options;
inline std::string defaultUserConfigLocation()
{
+#ifdef config_path
+ return config_path;
+#else
// try to locate an existing config
QString path = QStandardPaths::locate(QStandardPaths::ConfigLocation, "smolbote/smolbote.cfg");
@@ -26,6 +29,7 @@ inline std::string defaultUserConfigLocation()
path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/smolbote/smolbote.cfg";
return path.toStdString();
+#endif
}
Configuration::Configuration(QObject *parent)
diff --git a/lib/configuration/defaults.h.win32 b/lib/configuration/defaults.h.win32
index 9a8d5b3..dee9b14 100644
--- a/lib/configuration/defaults.h.win32
+++ b/lib/configuration/defaults.h.win32
@@ -1,6 +1,8 @@
#ifndef SMOLBOTE_DEFAULTS
#define SMOLBOTE_DEFAULTS
+#define config_path "smolbote.ini"
+
#define filter_path "hosts"
#define plugins_path "plugins"
#define profiles_path "profiles"