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:
parent
b9ad1c41b2
commit
a4e3768dfb
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user