Fixed synchronization

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-10-18 15:38:05 +03:00
parent d146d381e8
commit fd12524011
2 changed files with 13 additions and 4 deletions

View File

@ -83,6 +83,7 @@ void VCommonSettings::SetPathIndividualMeasurements(const QString &value)
{
QSettings settings(this->format(), this->scope(), this->organizationName());
settings.setValue(SettingPathsIndividualMeasurements, value);
settings.sync();
}
//---------------------------------------------------------------------------------------------------------------------
@ -97,6 +98,7 @@ void VCommonSettings::SetPathStandardMeasurements(const QString &value)
{
QSettings settings(this->format(), this->scope(), this->organizationName());
settings.setValue(SettingPathsStandardMeasurements, value);
settings.sync();
}
@ -112,6 +114,7 @@ void VCommonSettings::SetPathTemplate(const QString &value)
{
QSettings settings(this->format(), this->scope(), this->organizationName());
settings.setValue(SettingPathsTemplates, value);
settings.sync();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -91,25 +91,31 @@ void VSettings::SetLabelLanguage(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
QString VSettings::GetPathPattern() const
{
return value(SettingPathsPattern, QDir::homePath()).toString();
QSettings settings(this->format(), this->scope(), this->organizationName());
return settings.value(SettingPathsPattern, QDir::homePath()).toString();
}
//---------------------------------------------------------------------------------------------------------------------
void VSettings::SetPathPattern(const QString &value)
{
setValue(SettingPathsPattern, value);
QSettings settings(this->format(), this->scope(), this->organizationName());
settings.setValue(SettingPathsPattern, value);
settings.sync();
}
//---------------------------------------------------------------------------------------------------------------------
QString VSettings::GetPathLayout() const
{
return value(SettingPathsLayout, QDir::homePath()).toString();
QSettings settings(this->format(), this->scope(), this->organizationName());
return settings.value(SettingPathsLayout, QDir::homePath()).toString();
}
//---------------------------------------------------------------------------------------------------------------------
void VSettings::SetPathLayout(const QString &value)
{
setValue(SettingPathsLayout, value);
QSettings settings(this->format(), this->scope(), this->organizationName());
settings.setValue(SettingPathsLayout, value);
settings.sync();
}
//---------------------------------------------------------------------------------------------------------------------