mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-07 04:10:08 +00:00
Added a PropertiesFile::reload() method.
This commit is contained in:
parent
793fec6592
commit
8a3298ebb8
4 changed files with 11 additions and 14 deletions
|
|
@ -108,7 +108,7 @@ PropertiesFile::PropertiesFile (const File& f, const Options& o)
|
|||
file (f), options (o),
|
||||
loadedOk (false), needsWriting (false)
|
||||
{
|
||||
initialise();
|
||||
reload();
|
||||
}
|
||||
|
||||
PropertiesFile::PropertiesFile (const Options& o)
|
||||
|
|
@ -116,17 +116,18 @@ PropertiesFile::PropertiesFile (const Options& o)
|
|||
file (o.getDefaultFile()), options (o),
|
||||
loadedOk (false), needsWriting (false)
|
||||
{
|
||||
initialise();
|
||||
reload();
|
||||
}
|
||||
|
||||
void PropertiesFile::initialise()
|
||||
bool PropertiesFile::reload()
|
||||
{
|
||||
ProcessScopedLock pl (createProcessLock());
|
||||
|
||||
if (pl != nullptr && ! pl->isLocked())
|
||||
return; // locking failure..
|
||||
return false; // locking failure..
|
||||
|
||||
loadedOk = (! file.exists()) || loadAsBinary() || loadAsXml();
|
||||
return loadedOk;
|
||||
}
|
||||
|
||||
PropertiesFile::~PropertiesFile()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue