Commit ef006970 authored by Johnny Jazeix's avatar Johnny Jazeix

core, add default option to synchronize or not the configuration file when updating setting

parent 8fc80141
......@@ -474,8 +474,9 @@ void ApplicationSettings::saveActivityConfiguration(const QString &activity, con
QMapIterator<QString, QVariant> i(data);
while (i.hasNext()) {;
updateValueInConfig(activity, i.key(), i.value());
updateValueInConfig(activity, i.key(), i.value(), false);
QVariantMap ApplicationSettings::loadActivityConfiguration(const QString &activity)
......@@ -518,12 +519,14 @@ QStringList ApplicationSettings::currentLevels(const QString &activity)
template<class T> void ApplicationSettings::updateValueInConfig(const QString& group,
const QString& key, const T& value)
const QString& key, const T& value, bool sync)
m_config.setValue(key, value);
if(sync) {
int ApplicationSettings::loadActivityProgress(const QString &activity)
......@@ -662,7 +662,7 @@ protected:
// Update in configuration the couple {key, value} in the group.
template<class T> void updateValueInConfig(const QString& group,
const QString& key, const T& value);
const QString& key, const T& value, bool sync = true);
bool m_showLockedActivities;
bool m_isAudioVoicesEnabled;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment