summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/bundle.cpp2
-rw-r--r--options/globals.cpp11
-rw-r--r--options/globals.hpp5
3 files changed, 13 insertions, 5 deletions
diff --git a/options/bundle.cpp b/options/bundle.cpp
index 20cc5d90..517005f0 100644
--- a/options/bundle.cpp
+++ b/options/bundle.cpp
@@ -73,7 +73,7 @@ void bundle::store_kv(const QString& name, QVariant&& value)
return;
{
- mark_ini_modified();
+ options::globals::detail::mark_ini_modified();
QMutexLocker l{&mtx};
transient.put(name, value);
connector::notify_values(name);
diff --git a/options/globals.cpp b/options/globals.cpp
index 21aa4b4c..52e198db 100644
--- a/options/globals.cpp
+++ b/options/globals.cpp
@@ -76,6 +76,13 @@ ini_ctx& global_settings()
return ret;
}
+void mark_ini_modified(bool value)
+{
+ auto& ini = cur_settings();
+ ini.modifiedp = value;
+ ini.mtx.unlock();
+}
+
} // ns options::globals::detail
namespace options::globals
@@ -124,9 +131,9 @@ QStringList ini_list()
return list;
}
-void mark_ini_modified(bool value)
+void mark_global_ini_modified(bool value)
{
- auto& ini = cur_settings();
+ auto& ini = global_settings();
ini.modifiedp = value;
ini.mtx.unlock();
}
diff --git a/options/globals.hpp b/options/globals.hpp
index 9eb5777f..7af6533d 100644
--- a/options/globals.hpp
+++ b/options/globals.hpp
@@ -45,12 +45,13 @@ auto with_settings_object_(ini_ctx& ini, F&& fun)
OTR_OPTIONS_EXPORT ini_ctx& cur_settings();
OTR_OPTIONS_EXPORT ini_ctx& global_settings();
+OTR_OPTIONS_EXPORT void mark_ini_modified(bool value = true);
+
} // ns options::globals::detail
namespace options::globals
{
- OTR_OPTIONS_EXPORT void mark_ini_modified(bool value = true);
- OTR_OPTIONS_EXPORT bool is_ini_modified();
+ OTR_OPTIONS_EXPORT void mark_global_ini_modified(bool value = true);
OTR_OPTIONS_EXPORT QString ini_directory();
OTR_OPTIONS_EXPORT QString ini_filename();
OTR_OPTIONS_EXPORT QString ini_pathname();