From f9fdcec7e932843a91ddf7f377e00bd2a6efb82a Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 16 May 2022 14:37:00 -0400 Subject: 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") --- src/interfaces/node.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interfaces') diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 1585174a6f..2c31e12ada 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -112,6 +112,10 @@ public: //! source, but not being persisted. virtual void forceSetting(const std::string& name, const util::SettingsValue& value) = 0; + //! Clear all settings in /settings.json and store a backup of + //! previous settings in /settings.json.bak. + virtual void resetSettings() = 0; + //! Map port. virtual void mapPort(bool use_upnp, bool use_natpmp) = 0; -- cgit v1.2.3