summaryrefslogtreecommitdiffhomepage
path: root/options/globals.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-02 00:50:18 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-02 00:50:18 +0100
commit629b459b35268b0bba31bc824eb7078305d3c210 (patch)
tree3cfbccfdd7b0dc182ed95d41b71a80177bc3854d /options/globals.cpp
parent6d40b2fcdbc2b66fcb0a62b48151035e3aa293d5 (diff)
options/globals: always return same document directory
Diffstat (limited to 'options/globals.cpp')
-rw-r--r--options/globals.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/options/globals.cpp b/options/globals.cpp
index 3bd185af..dbc6df90 100644
--- a/options/globals.cpp
+++ b/options/globals.cpp
@@ -11,7 +11,7 @@ namespace options::globals::detail {
ini_ctx::ini_ctx() = default;
-bool is_portable_installation()
+static bool is_portable_installation()
{
#if defined _WIN32
// must keep consistent between invocations
@@ -143,7 +143,7 @@ void mark_ini_modified(bool value)
ini.mtx.unlock();
}
-QString ini_directory()
+static QString ini_directory_()
{
QString dir;
@@ -173,4 +173,10 @@ QString ini_directory()
return dir;
}
+QString ini_directory()
+{
+ static const QString dir = ini_directory_();
+ return dir;
+}
+
} // ns options::globals