46 void ApplicationProperties::openFiles()
55 if (userProps ==
nullptr)
57 o.commonToAllUsers =
false;
61 if (commonProps ==
nullptr)
63 o.commonToAllUsers =
true;
64 commonProps.reset (
new PropertiesFile (o));
67 userProps->setFallbackPropertySet (commonProps.get());
73 if (userProps ==
nullptr)
76 return userProps.get();
81 if (commonProps ==
nullptr)
84 if (returnUserPropsIfReadOnly)
86 if (commonSettingsAreReadOnly == 0)
87 commonSettingsAreReadOnly = commonProps->save() ? -1 : 1;
89 if (commonSettingsAreReadOnly > 0)
90 return userProps.get();
93 return commonProps.get();
98 return (userProps ==
nullptr || userProps->saveIfNeeded())
99 && (commonProps ==
nullptr || commonProps->saveIfNeeded());
PropertiesFile * getUserSettings()
PropertiesFile * getCommonSettings(bool returnUserPropsIfReadOnly)
void setStorageParameters(const PropertiesFile::Options &options)
bool isNotEmpty() const noexcept