MCPcopy Create free account
hub / github.com/ElementsProject/elements / Reset

Method Reset

src/qt/optionsmodel.cpp:221–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void OptionsModel::Reset()
222{
223 QSettings settings;
224
225 // Backup old settings to chain-specific datadir for troubleshooting
226 BackupSettings(gArgs.GetDataDirNet() / "guisettings.ini.bak", settings);
227
228 // Save the strDataDir setting
229 QString dataDir = GUIUtil::getDefaultDataDirectory();
230 dataDir = settings.value("strDataDir", dataDir).toString();
231
232 // Remove all entries from our QSettings object
233 settings.clear();
234
235 // Set strDataDir
236 settings.setValue("strDataDir", dataDir);
237
238 // Set that this was reset
239 settings.setValue("fReset", true);
240
241 // default setting for OptionsModel::StartAtStartup - disabled
242 if (GUIUtil::GetStartOnSystemStartup())
243 GUIUtil::SetStartOnSystemStartup(false);
244}
245
246int OptionsModel::rowCount(const QModelIndex & parent) const
247{

Callers 1

Calls 7

BackupSettingsFunction · 0.85
getDefaultDataDirectoryFunction · 0.85
GetStartOnSystemStartupFunction · 0.85
SetStartOnSystemStartupFunction · 0.85
valueMethod · 0.45
clearMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected