MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Reset

Method Reset

src/qt/optionsmodel.cpp:181–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void OptionsModel::Reset()
182{
183 QSettings settings;
184
185 // Backup old settings to chain-specific datadir for troubleshooting
186 BackupSettings(GetDataDir(true) / "guisettings.ini.bak", settings);
187
188 // Save the strDataDir setting
189 QString dataDir = Intro::getDefaultDataDirectory();
190 dataDir = settings.value("strDataDir", dataDir).toString();
191
192 // Remove all entries from our QSettings object
193 settings.clear();
194
195 // Set strDataDir
196 settings.setValue("strDataDir", dataDir);
197
198 // Set that this was reset
199 settings.setValue("fReset", true);
200
201 // default setting for OptionsModel::StartAtStartup - disabled
202 if (GUIUtil::GetStartOnSystemStartup())
203 GUIUtil::SetStartOnSystemStartup(false);
204}
205
206int OptionsModel::rowCount(const QModelIndex & parent) const
207{

Callers 1

Calls 6

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

Tested by

no test coverage detected