diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 97bc09826..0a1540184 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -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(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 04c76151f..d16c7342a 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -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(); } //---------------------------------------------------------------------------------------------------------------------