41void ApplicationProperties::openFiles()
50 if (userProps ==
nullptr)
52 o.commonToAllUsers =
false;
56 if (commonProps ==
nullptr)
58 o.commonToAllUsers =
true;
59 commonProps.reset (
new PropertiesFile (o));
62 userProps->setFallbackPropertySet (commonProps.get());
68 if (userProps ==
nullptr)
71 return userProps.get();
76 if (commonProps ==
nullptr)
79 if (returnUserPropsIfReadOnly)
81 if (commonSettingsAreReadOnly == 0)
82 commonSettingsAreReadOnly = commonProps->save() ? -1 : 1;
84 if (commonSettingsAreReadOnly > 0)
85 return userProps.get();
88 return commonProps.get();
93 return (userProps ==
nullptr || userProps->saveIfNeeded())
94 && (commonProps ==
nullptr || commonProps->saveIfNeeded());
PropertiesFile * getUserSettings()
PropertiesFile * getCommonSettings(bool returnUserPropsIfReadOnly)
void setStorageParameters(const PropertiesFile::Options &options)
bool isNotEmpty() const noexcept