4
0
mirror of https://github.com/QuasarApp/QuasarAppLib.git synced 2025-05-07 06:59:44 +00:00

added force reloade function into settings implementation

This commit is contained in:
Andrei Yankovich 2022-06-19 15:04:34 +03:00
parent b9ad1c41b2
commit a4e3768dfb
2 changed files with 12 additions and 0 deletions

@ -60,6 +60,12 @@ void ISettings::sync() {
return syncImplementation();
}
void ISettings::forceReloadCache() {
for (auto it = _cache.begin(); it != _cache.end(); ++it) {
setValue(it.key(), getValueImplementation(it.key(), it.value()));
}
}
void ISettings::setValue(const QString key, const QVariant &value) {
if (_cache.contains(key) && _cache.value(key) == value) {

@ -95,6 +95,12 @@ public:
*/
void sync();
/**
* @brief forceReloadCache This method force reload settings data from disk.
* @note Cache will be refreshed
*/
void forceReloadCache();
/**
* @brief getMode This method return the current mode of the settings.
* @return the current mode of the settings.