mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
settings: Add resetSettings() method
Allows the GUI to clear settings.json file and save settings.json.bak file when GUI "Reset Options" button is pressed or -resetguisettings command line option is used. (GUI code already backs up and resets the "guisettings.ini" file this way, so this just makes the same behavior possible for "settings.json")
This commit is contained in:
@@ -440,7 +440,7 @@ protected:
|
||||
* Get settings file path, or return false if read-write settings were
|
||||
* disabled with -nosettings.
|
||||
*/
|
||||
bool GetSettingsPath(fs::path* filepath = nullptr, bool temp = false) const;
|
||||
bool GetSettingsPath(fs::path* filepath = nullptr, bool temp = false, bool backup = false) const;
|
||||
|
||||
/**
|
||||
* Read settings file. Push errors to vector, or log them if null.
|
||||
@@ -448,9 +448,10 @@ protected:
|
||||
bool ReadSettingsFile(std::vector<std::string>* errors = nullptr);
|
||||
|
||||
/**
|
||||
* Write settings file. Push errors to vector, or log them if null.
|
||||
* Write settings file or backup settings file. Push errors to vector, or
|
||||
* log them if null.
|
||||
*/
|
||||
bool WriteSettingsFile(std::vector<std::string>* errors = nullptr) const;
|
||||
bool WriteSettingsFile(std::vector<std::string>* errors = nullptr, bool backup = false) const;
|
||||
|
||||
/**
|
||||
* Get current setting from config file or read/write settings file,
|
||||
|
||||
Reference in New Issue
Block a user